refactor: use types for once() return values in spec (#38872)

This commit is contained in:
Milan Burda 2023-06-22 20:38:52 +02:00 committed by GitHub
parent abec9ead06
commit 9226cc662b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 85 additions and 85 deletions

View file

@ -1412,7 +1412,7 @@ describe('session module', () => {
describe('session-created event', () => {
it('is emitted when a session is created', async () => {
const sessionCreated = once(app, 'session-created');
const sessionCreated = once(app, 'session-created') as Promise<[any, Session]>;
const session1 = session.fromPartition('' + Math.random());
const [session2] = await sessionCreated;
expect(session1).to.equal(session2);