Skip to content

Commit ed4abc9

Browse files
committed
Move doctests to its own directory
This works around an issue with newer Cabals where other-modules are passed around for tests, which meant that Doctests.hs was being treated as a dependency of Spec.hs, and vice versa. This fixes #126
1 parent a6a77c9 commit ed4abc9

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

graphql-api.cabal

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--
33
-- see: https://github.com/sol/hpack
44
--
5-
-- hash: 39113cf0b3911f4704bf80289a842f6a6cad623940e0146c3af99de590799257
5+
-- hash: 78a5a4f0c4375f8d03bffd738aeb76a00fdf535cd6bc2e07cdaa13de38b1e614
66

77
name: graphql-api
88
version: 0.2.0
@@ -65,9 +65,9 @@ library
6565

6666
test-suite graphql-api-doctests
6767
type: exitcode-stdio-1.0
68-
main-is: Doctests.hs
68+
main-is: Main.hs
6969
hs-source-dirs:
70-
tests
70+
tests/doctests
7171
default-extensions: NoImplicitPrelude OverloadedStrings RecordWildCards TypeApplications
7272
ghc-options: -Wall -fno-warn-redundant-constraints -threaded
7373
build-depends:
@@ -78,18 +78,6 @@ test-suite graphql-api-doctests
7878
, protolude >=0.2.1
7979
, transformers
8080
other-modules:
81-
ASTTests
82-
EndToEndTests
83-
EnumTests
84-
Examples.InputObject
85-
Examples.UnionExample
86-
ExampleSchema
87-
OrderedMapTests
88-
ResolverTests
89-
SchemaTests
90-
Spec
91-
ValidationTests
92-
ValueTests
9381
Paths_graphql_api
9482
default-language: Haskell2010
9583

@@ -117,7 +105,6 @@ test-suite graphql-api-tests
117105
, transformers
118106
other-modules:
119107
ASTTests
120-
Doctests
121108
EndToEndTests
122109
EnumTests
123110
Examples.InputObject

package.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ tests:
5151
- directory
5252

5353
graphql-api-doctests:
54-
main: Doctests.hs
54+
main: Main.hs
5555
ghc-options: -threaded
56-
source-dirs: tests
56+
source-dirs: tests/doctests
5757
dependencies:
5858
- doctest
5959

0 commit comments

Comments
 (0)