mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-27 06:47:31 +03:00
16 lines
524 B
Haskell
16 lines
524 B
Haskell
module Generator.CommonTest where
|
|
|
|
import Test.Tasty.Hspec
|
|
import Wasp.Generator.Common (makeJsArrayFromHaskellList)
|
|
|
|
spec_GeneratorCommonTest :: Spec
|
|
spec_GeneratorCommonTest = do
|
|
describe "makeJsArrayFromHaskellList" $ do
|
|
it "creates an empty JS array from empty Haskell list" $ do
|
|
makeJsArrayFromHaskellList []
|
|
`shouldBe` "[]"
|
|
|
|
it "creates an array of strings from Haskell list of strings" $ do
|
|
makeJsArrayFromHaskellList ["one", "two", "three"]
|
|
`shouldBe` "['one', 'two', 'three']"
|