Skip to content

Commit c2e0f8a

Browse files
Merge pull request nestjs#3584 from tonyhallett/correct_not_awaiting
test(core): correct not awaiting promises
2 parents f248243 + 681b859 commit c2e0f8a

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
@@ -340,7 +340,7 @@ describe('RouterExecutionContext', () => {
340340
});
341341
});
342342
describe('when "renderTemplate" is undefined', () => {
343-
it('should not call "res.render()"', () => {
343+
it('should not call "res.render()"', async () => {
344344
const result = Promise.resolve('test');
345345
const response = { render: sinon.spy() };
346346

@@ -353,7 +353,7 @@ describe('RouterExecutionContext', () => {
353353
undefined,
354354
200,
355355
);
356-
handler(result, response);
356+
await handler(result, response);
357357

358358
expect(response.render.called).to.be.false;
359359
});
@@ -391,7 +391,7 @@ describe('RouterExecutionContext', () => {
391391
});
392392

393393
describe('when "redirectResponse" is undefined', () => {
394-
it('should not call "res.render()"', () => {
394+
it('should not call "res.render()"', async () => {
395395
const result = Promise.resolve('test');
396396
const response = { redirect: sinon.spy() };
397397

@@ -404,7 +404,7 @@ describe('RouterExecutionContext', () => {
404404
undefined,
405405
200,
406406
);
407-
handler(result, response);
407+
await handler(result, response);
408408

409409
expect(response.redirect.called).to.be.false;
410410
});

0 commit comments

Comments
 (0)