Skip to content

Commit 41e6188

Browse files
kl0tlerikd
authored andcommitted
Add missing tests for exports of variables and function declarations
1 parent 7190b2e commit 41e6188

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

test/Test/Language/Javascript/Minify.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ testMinifyModule = describe "Minify modules:" $ do
274274
minifyModule " export { a, b as c , d } ; " `shouldBe` "export{a,b as c,d}"
275275
minifyModule " export { } from \"mod\" ; " `shouldBe` "export{}from\"mod\""
276276
minifyModule " export const a = 1 ; " `shouldBe` "export const a=1"
277+
minifyModule " export function f () { } ; " `shouldBe` "export function f(){}"
277278

278279
-- -----------------------------------------------------------------------------
279280
-- Minify test helpers.

test/Test/Language/Javascript/RoundTrip.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ testRoundTrip = describe "Roundtrip:" $ do
118118
testRTModule "export { a , b , c };"
119119
testRTModule "export { a, X as B, c }"
120120
testRTModule "export {} from \"mod\";"
121+
testRTModule "export const a = 1 ; "
122+
testRTModule "export function f () { } ; "
121123

122124

123125
testRT :: String -> Expectation

0 commit comments

Comments
 (0)