From 041403161891736d6d8ca0ddc91f0a1ed4749231 Mon Sep 17 00:00:00 2001 From: Aaron VonderHaar Date: Sun, 1 May 2022 00:13:19 -0700 Subject: [PATCH] Add hspec test module --- .github/workflows/verify.yml | 2 ++ gren.cabal | 19 +++++++++++++++++++ tests/Spec.hs | 1 + 3 files changed, 22 insertions(+) create mode 100644 tests/Spec.hs diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 5552a802..9912d225 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -29,3 +29,5 @@ jobs: - name: Build run: cabal build -f dev + - name: Tests + run: cabal test -f dev diff --git a/gren.cabal b/gren.cabal index 601f93fe..e28500e0 100644 --- a/gren.cabal +++ b/gren.cabal @@ -214,3 +214,22 @@ Executable gren Main-Is: Main.hs + +Test-Suite gren-tests + Import: + gren-common + + Type: + exitcode-stdio-1.0 + + Hs-Source-Dirs: + tests + + Main-Is: + Spec.hs + + Build-Depends: + hspec >= 2.7.10 && < 3 + + Build-Tool-Depends: + hspec-discover:hspec-discover >= 2.7.10 && < 3 diff --git a/tests/Spec.hs b/tests/Spec.hs new file mode 100644 index 00000000..a824f8c3 --- /dev/null +++ b/tests/Spec.hs @@ -0,0 +1 @@ +{-# OPTIONS_GHC -F -pgmF hspec-discover #-}