Skip to content

Commit 681b859

Browse files
committed
test(core): correct not awaiting promises
1 parent 36d5a81 commit 681b859

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/core/test/router/router-execution-context.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ describe('RouterExecutionContext', () => {
317317
});
318318
});
319319
describe('when "renderTemplate" is undefined', () => {
320-
it('should not call "res.render()"', () => {
320+
it('should not call "res.render()"', async () => {
321321
const result = Promise.resolve('test');
322322
const response = { render: sinon.spy() };
323323

@@ -330,7 +330,7 @@ describe('RouterExecutionContext', () => {
330330
undefined,
331331
200,
332332
);
333-
handler(result, response);
333+
await handler(result, response);
334334

335335
expect(response.render.called).to.be.false;
336336
});
@@ -368,7 +368,7 @@ describe('RouterExecutionContext', () => {
368368
});
369369

370370
describe('when "redirectResponse" is undefined', () => {
371-
it('should not call "res.render()"', () => {
371+
it('should not call "res.render()"', async () => {
372372
const result = Promise.resolve('test');
373373
const response = { redirect: sinon.spy() };
374374

@@ -381,7 +381,7 @@ describe('RouterExecutionContext', () => {
381381
undefined,
382382
200,
383383
);
384-
handler(result, response);
384+
await handler(result, response);
385385

386386
expect(response.redirect.called).to.be.false;
387387
});

0 commit comments

Comments
 (0)