Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 8194ae6

Browse files
kyarikIvanGoncharov
authored andcommitted
Compare uninitialized variables against undefined
Comparing against null will pass whether the variables were assigned the request/response object or left undefined. However, the intention of the expectation is to check that uninitialized variables were assigned a value (i.e., not undefined).
1 parent db43bfe commit 8194ae6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/__tests__/http-test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ function runTests(server: Server) {
561561

562562
expect(response.text).to.equal('{"data":{"test":"Hello World"}}');
563563

564-
expect(seenRequest).to.not.equal(null);
565-
expect(seenResponse).to.not.equal(null);
564+
expect(seenRequest).to.not.equal(undefined);
565+
expect(seenResponse).to.not.equal(undefined);
566566
expect(seenParams).to.deep.equal({
567567
query: '{ test }',
568568
operationName: null,
@@ -2175,7 +2175,7 @@ function runTests(server: Server) {
21752175
expect(response.text).to.equal(
21762176
'{"data":{"test":"Hello World","test2":"Modification"}}',
21772177
);
2178-
expect(seenExecuteArgs).to.not.equal(null);
2178+
expect(seenExecuteArgs).to.not.equal(undefined);
21792179
});
21802180

21812181
it('catches errors thrown from custom execute function', async () => {

0 commit comments

Comments
 (0)