11import { inspect } from './inspect.js' ;
22
33/* c8 ignore next 3 */
4- const isDevelopment =
5- globalThis . process != null &&
4+ const isProduction =
5+ globalThis . process == null ||
66 // eslint-disable-next-line no-undef
7- process . env . NODE_ENV === 'development' ;
7+ ( process . env . NODE_ENV !== 'development' &&
8+ // eslint-disable-next-line no-undef
9+ process . env . NODE_ENV !== 'test' ) ;
810
911/**
1012 * A replacement for instanceof which includes an error warning when multi-realm
@@ -13,8 +15,13 @@ const isDevelopment =
1315 * See: https://webpack.js.org/guides/production/
1416 */
1517export const instanceOf : ( value : unknown , constructor : Constructor ) => boolean =
16- isDevelopment
18+ /* c8 ignore next 6 */
19+ // FIXME: https://github.com/graphql/graphql-js/issues/2317
20+ isProduction
1721 ? function instanceOf ( value : unknown , constructor : Constructor ) : boolean {
22+ return value instanceof constructor ;
23+ }
24+ : function instanceOf ( value : unknown , constructor : Constructor ) : boolean {
1825 if ( value instanceof constructor ) {
1926 return true ;
2027 }
@@ -45,11 +52,6 @@ spurious results.`,
4552 }
4653 }
4754 return false ;
48- }
49- : /* c8 ignore next 4 */
50- // FIXME: https://github.com/graphql/graphql-js/issues/2317
51- function instanceOf ( value : unknown , constructor : Constructor ) : boolean {
52- return value instanceof constructor ;
5355 } ;
5456
5557interface Constructor extends Function {
0 commit comments