wasp/waspc/test/Generator/CommonTest.hs

16 lines
524 B
Haskell
Raw Normal View History

2023-04-19 02:14:06 +03:00
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']"