File tree Expand file tree Collapse file tree 4 files changed +20
-10
lines changed Expand file tree Collapse file tree 4 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 11const assert = require ( 'assert' ) ;
2- const expect = require ( 'expect' ) ;
32const { readFileSync } = require ( 'fs' ) ;
43
54const {
@@ -62,4 +61,4 @@ class Source {
6261 }
6362}
6463const source = new Source ( ) ;
65- expect ( isSource ( source ) ) . to . equal ( false ) ;
64+ assert ( isSource ( source ) === false ) ;
Original file line number Diff line number Diff line change 11/* eslint-disable simple-import-sort/imports */
22import assert from 'assert' ;
3- import expect from 'expect' ;
43import { readFileSync } from 'fs' ;
54
65import {
@@ -63,4 +62,4 @@ class Source {
6362 }
6463}
6564const source = new Source ( ) ;
66- expect ( isSource ( source ) ) . to . equal ( false ) ;
65+ assert ( isSource ( source ) === false ) ;
Original file line number Diff line number Diff line change 1- const expect = require ( 'expect' ) ;
1+ const assert = require ( 'expect' ) ;
22
33const { isSource } = require ( 'graphql' ) ;
44
@@ -8,8 +8,14 @@ class Source {
88 }
99}
1010const source = new Source ( ) ;
11- expect ( ( ) =>
12- isSource ( source ) . to . throw (
11+ let error ;
12+ try {
13+ isSource ( source ) ;
14+ } catch ( _error ) {
15+ error = _error ;
16+ }
17+ assert (
18+ String ( error ?. message ) . match (
1319 / ^ C a n n o t u s e S o u r c e " { } " f r o m a n o t h e r m o d u l e o r r e a l m ./ m,
1420 ) ,
1521) ;
Original file line number Diff line number Diff line change 11/* eslint-disable simple-import-sort/imports */
2- import expect from 'expect ' ;
2+ import assert from 'assert ' ;
33
44import { isSource } from 'graphql-esm' ;
55
@@ -9,8 +9,14 @@ class Source {
99 }
1010}
1111const source = new Source ( ) ;
12- expect ( ( ) =>
13- isSource ( source ) . to . throw (
12+ let error ;
13+ try {
14+ isSource ( source ) ;
15+ } catch ( _error ) {
16+ error = _error ;
17+ }
18+ assert (
19+ String ( error ?. message ) . match (
1420 / ^ C a n n o t u s e S o u r c e " { } " f r o m a n o t h e r m o d u l e o r r e a l m ./ m,
1521 ) ,
1622) ;
You can’t perform that action at this time.
0 commit comments