Skip to content

Commit

Permalink
better assertion condition
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ru4l committed Mar 11, 2024
1 parent 36471cb commit 96780eb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/executor/src/execution/__tests__/subscribe-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1287,11 +1287,10 @@ describe('Subscription Publish Phase', () => {
},
});

try {
await iterator.next();
} catch (error: unknown) {
expect(error).toMatchObject({ message: 'test error', locations: [{ line: 2, column: 9 }] });
}
await expect(iterator.next()).rejects.toMatchObject({
message: 'test error',
locations: [{ line: 2, column: 9 }],
});

const endResult = await iterator.next();

Expand Down

0 comments on commit 96780eb

Please sign in to comment.