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 11import { describe , it , expect } from '@jest/globals' ;
2- import { version } from 'graphql17' ;
2+ import 'graphql17/dev' ;
3+ import { GraphQLObjectType , isObjectType , version } from 'graphql17' ;
34
45describe ( 'canary ESM graphql v17-alpha' , ( ) => {
56 it ( 'should work' , ( ) => {
67 expect ( version ) . toBe ( '17.0.0-alpha.9' ) ; // this version is the latest alpha on which the canary is based
78 } ) ;
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+ } ) ;
823} ) ;
You can’t perform that action at this time.
0 commit comments