File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
packages/server/src/__tests__ Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { describe , it , expect } from '@jest/globals' ;
2
- import { version } from 'graphql17' ;
2
+ import 'graphql17/dev' ;
3
+ import { GraphQLObjectType , isObjectType , version } from 'graphql17' ;
3
4
4
5
describe ( 'canary ESM graphql v17-alpha' , ( ) => {
5
6
it ( 'should work' , ( ) => {
6
7
expect ( version ) . toBe ( '17.0.0-alpha.9' ) ; // this version is the latest alpha on which the canary is based
7
8
} ) ;
9
+
10
+ it ( 'should use development mode when set by our Jest Config' , ( ) => {
11
+ function getFakeGraphQLObjectType ( ) {
12
+ class GraphQLObjectType {
13
+ get [ Symbol . toStringTag ] ( ) {
14
+ return 'GraphQLObjectType' ;
15
+ }
16
+ }
17
+ return new GraphQLObjectType ( ) ;
18
+ }
19
+
20
+ expect ( isObjectType ( new GraphQLObjectType ( { name : 'SomeType' , fields : { } } ) ) ) . toBe ( true ) ;
21
+ expect ( ( ) => isObjectType ( getFakeGraphQLObjectType ( ) ) ) . toThrow ( ) ;
22
+ } ) ;
8
23
} ) ;
You can’t perform that action at this time.
0 commit comments