Skip to content

Commit a735422

Browse files
committed
use assert instead of type cast
1 parent 211e3f2 commit a735422

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/execution/__tests__/subscribe-test.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -461,13 +461,9 @@ describe('Subscription Initialization Phase', () => {
461461
'Subscription field must return Async Iterable. Received: "test".',
462462
);
463463

464-
(
465-
await expectPromise(
466-
subscribeWithFn(() =>
467-
Promise.resolve('test'),
468-
) as Promise<ExecutionResult>,
469-
)
470-
).toRejectWith(
464+
const result = subscribeWithFn(() => Promise.resolve('test'));
465+
assert(isPromise(result));
466+
(await expectPromise(result)).toRejectWith(
471467
'Subscription field must return Async Iterable. Received: "test".',
472468
);
473469
});

0 commit comments

Comments
 (0)