Fix warnings in tests (#801)

This commit is contained in:
Shayne Czyzewski 2022-11-06 08:26:53 -05:00 committed by GitHub
parent d9fc27bcde
commit e0fd8975a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -192,6 +192,7 @@ spec_AppSpecValid = do
basicAppSpec = basicAppSpec =
AS.AppSpec AS.AppSpec
{ AS.decls = [basicAppDecl], { AS.decls = [basicAppDecl],
AS.waspProjectDir = systemSPRoot SP.</> [SP.reldir|test/|],
AS.externalCodeDirPath = systemSPRoot SP.</> [SP.reldir|test/src|], AS.externalCodeDirPath = systemSPRoot SP.</> [SP.reldir|test/src|],
AS.externalCodeFiles = [], AS.externalCodeFiles = [],
AS.isBuild = False, AS.isBuild = False,
@ -199,7 +200,6 @@ spec_AppSpecValid = do
AS.dotEnvServerFile = Nothing, AS.dotEnvServerFile = Nothing,
AS.dotEnvClientFile = Nothing, AS.dotEnvClientFile = Nothing,
AS.userDockerfileContents = Nothing, AS.userDockerfileContents = Nothing,
AS.waspProjectDir = systemSPRoot SP.</> [SP.reldir|test/|],
AS.configFiles = [] AS.configFiles = []
} }

View File

@ -6,6 +6,7 @@ import System.FilePath ((</>))
import Test.Tasty.Hspec import Test.Tasty.Hspec
import qualified Wasp.AppSpec as AS import qualified Wasp.AppSpec as AS
import qualified Wasp.AppSpec.App as AS.App import qualified Wasp.AppSpec.App as AS.App
import qualified Wasp.AppSpec.App.Wasp as AS.Wasp
import qualified Wasp.AppSpec.Core.Decl as AS.Decl import qualified Wasp.AppSpec.Core.Decl as AS.Decl
import Wasp.Generator.FileDraft import Wasp.Generator.FileDraft
import qualified Wasp.Generator.FileDraft.CopyDirFileDraft as CopyDirFD import qualified Wasp.Generator.FileDraft.CopyDirFileDraft as CopyDirFD
@ -15,6 +16,7 @@ import qualified Wasp.Generator.FileDraft.TextFileDraft as TextFD
import Wasp.Generator.Monad (runGenerator) import Wasp.Generator.Monad (runGenerator)
import Wasp.Generator.WebAppGenerator import Wasp.Generator.WebAppGenerator
import qualified Wasp.Generator.WebAppGenerator.Common as Common import qualified Wasp.Generator.WebAppGenerator.Common as Common
import qualified Wasp.Version as WV
-- TODO(martin): We could maybe define Arbitrary instance for AppSpec, define properties -- TODO(martin): We could maybe define Arbitrary instance for AppSpec, define properties
-- over generator functions and then do property testing on them, that would be cool. -- over generator functions and then do property testing on them, that would be cool.
@ -27,7 +29,11 @@ spec_WebAppGenerator = do
[ AS.Decl.makeDecl [ AS.Decl.makeDecl
"TestApp" "TestApp"
AS.App.App AS.App.App
{ AS.App.title = "Test App", { AS.App.wasp =
AS.Wasp.Wasp
{ AS.Wasp.version = "^" ++ show WV.waspVersion
},
AS.App.title = "Test App",
AS.App.db = Nothing, AS.App.db = Nothing,
AS.App.server = Nothing, AS.App.server = Nothing,
AS.App.client = Nothing, AS.App.client = Nothing,
@ -36,6 +42,7 @@ spec_WebAppGenerator = do
AS.App.head = Nothing AS.App.head = Nothing
} }
], ],
AS.waspProjectDir = systemSPRoot SP.</> [SP.reldir|test/|],
AS.externalCodeDirPath = systemSPRoot SP.</> [SP.reldir|test/src|], AS.externalCodeDirPath = systemSPRoot SP.</> [SP.reldir|test/src|],
AS.externalCodeFiles = [], AS.externalCodeFiles = [],
AS.isBuild = False, AS.isBuild = False,