Skip to content

Commit 1781164

Browse files
ardatanyaacovCR
authored andcommitted
Add more tests
1 parent 9284dab commit 1781164

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/utilities/__tests__/astFromValue-test.ts

+10
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ describe('astFromValue', () => {
9090
'Int cannot represent non 32-bit signed integer value: 1e+40',
9191
);
9292

93+
// Note: outside the bounds of 32bit signed int.
94+
expect(() => astFromValue(9007199254740991, GraphQLInt)).to.throw(
95+
'Int cannot represent non 32-bit signed integer value: 9007199254740991',
96+
);
97+
98+
// Note: outside the bounds of 32bit signed int as BigInt.
99+
expect(() => astFromValue(9007199254740991n, GraphQLInt)).to.throw(
100+
'Int cannot represent non 32-bit signed integer value: 9007199254740991',
101+
);
102+
93103
expect(() => astFromValue(NaN, GraphQLInt)).to.throw(
94104
'Int cannot represent non-integer value: NaN',
95105
);

0 commit comments

Comments
 (0)