File tree Expand file tree Collapse file tree 19 files changed +76
-105
lines changed Expand file tree Collapse file tree 19 files changed +76
-105
lines changed Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in Bun development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in Deno development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in esbuild development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in Next.js development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in Node.js explicit development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in Node.js implicit development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in Rollup development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in SWC development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in Vite development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
-
12
10
try {
13
- isObjectType ( fakeInstance ) ;
11
+ isObjectType ( new GraphQLObjectType ( ) ) ;
14
12
assert . fail ( 'Expected isObjectType to throw an error in Webpack development mode.' ) ;
15
13
} catch ( error ) {
16
14
assert . ok (
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
- const result = isObjectType ( fakeInstance ) ;
10
+ const result = isObjectType ( new GraphQLObjectType ( ) ) ;
12
11
assert . strictEqual ( result , false , 'isObjectType should return false in Bun production mode.' ) ;
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
- const result = isObjectType ( fakeInstance ) ;
10
+ const result = isObjectType ( new GraphQLObjectType ( ) ) ;
12
11
assert . strictEqual ( result , false , 'isObjectType should return false in Deno production mode.' ) ;
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
- const result = isObjectType ( fakeInstance ) ;
10
+ const result = isObjectType ( new GraphQLObjectType ( ) ) ;
12
11
assert . strictEqual ( result , false , 'isObjectType should return false in esbuild production mode.' ) ;
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
- const result = isObjectType ( fakeInstance ) ;
10
+ const result = isObjectType ( new GraphQLObjectType ( ) ) ;
12
11
assert . strictEqual ( result , false , 'isObjectType should return false in Next.js production mode.' ) ;
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
- const result = isObjectType ( fakeInstance ) ;
10
+ const result = isObjectType ( new GraphQLObjectType ( ) ) ;
12
11
assert . strictEqual ( result , false , 'isObjectType should return false in Node.js production mode.' ) ;
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
- const result = isObjectType ( fakeInstance ) ;
10
+ const result = isObjectType ( new GraphQLObjectType ( ) ) ;
12
11
assert . strictEqual ( result , false , 'isObjectType should return false in Rollup production mode.' ) ;
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
- const result = isObjectType ( fakeInstance ) ;
10
+ const result = isObjectType ( new GraphQLObjectType ( ) ) ;
12
11
assert . strictEqual ( result , false , 'isObjectType should return false in SWC production mode.' ) ;
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
- const result = isObjectType ( fakeInstance ) ;
10
+ const result = isObjectType ( new GraphQLObjectType ( ) ) ;
12
11
assert . strictEqual ( result , false , 'isObjectType should return false in Vite production mode.' ) ;
Original file line number Diff line number Diff line change 1
1
import assert from 'assert' ;
2
2
import { isObjectType } from 'graphql' ;
3
3
4
- class FakeGraphQLObjectType {
5
- constructor ( ) {
6
- this . name = 'Fake ';
4
+ class GraphQLObjectType {
5
+ get [ Symbol . toStringTag ] ( ) {
6
+ return 'GraphQLObjectType ';
7
7
}
8
8
}
9
9
10
- const fakeInstance = new FakeGraphQLObjectType ( ) ;
11
- const result = isObjectType ( fakeInstance ) ;
10
+ const result = isObjectType ( new GraphQLObjectType ( ) ) ;
12
11
assert . strictEqual ( result , false , 'isObjectType should return false in Webpack production mode.' ) ;
You can’t perform that action at this time.
0 commit comments