Skip to content

Commit 32ccd7f

Browse files
committed
f
1 parent 17cf69f commit 32ccd7f

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

integrationTests/node/index.cjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const assert = require('assert');
2-
const expect = require('expect');
32
const { readFileSync } = require('fs');
43

54
const {
@@ -62,4 +61,4 @@ class Source {
6261
}
6362
}
6463
const source = new Source();
65-
expect(isSource(source)).to.equal(false);
64+
assert(isSource(source) === false);

integrationTests/node/index.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* eslint-disable simple-import-sort/imports */
22
import assert from 'assert';
3-
import expect from 'expect';
43
import { readFileSync } from 'fs';
54

65
import {
@@ -63,4 +62,4 @@ class Source {
6362
}
6463
}
6564
const source = new Source();
66-
expect(isSource(source)).to.equal(false);
65+
assert(isSource(source) === false);
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const expect = require('expect');
1+
const assert = require('expect');
22

33
const { isSource } = require('graphql');
44

@@ -8,8 +8,14 @@ class Source {
88
}
99
}
1010
const 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
/^Cannot use Source "{}" from another module or realm./m,
1420
),
1521
);
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable simple-import-sort/imports */
2-
import expect from 'expect';
2+
import assert from 'assert';
33

44
import { isSource } from 'graphql-esm';
55

@@ -9,8 +9,14 @@ class Source {
99
}
1010
}
1111
const 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
/^Cannot use Source "{}" from another module or realm./m,
1521
),
1622
);

0 commit comments

Comments
 (0)