Skip to content

Commit 6c57f77

Browse files
test(core): fix redirect test
1 parent c8b3e76 commit 6c57f77

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
@@ -1,10 +1,12 @@
1+
import { ForbiddenException } from '@nestjs/common/exceptions/forbidden.exception';
12
import { expect } from 'chai';
23
import * as sinon from 'sinon';
3-
import { RouteParamMetadata, HttpStatus } from '../../../common';
4+
import { HttpStatus, RouteParamMetadata } from '../../../common';
45
import { CUSTOM_ROUTE_AGRS_METADATA } from '../../../common/constants';
56
import { RouteParamtypes } from '../../../common/enums/route-paramtypes.enum';
67
import { AbstractHttpAdapter } from '../../adapters';
78
import { ApplicationConfig } from '../../application-config';
9+
import { FORBIDDEN_MESSAGE } from '../../guards/constants';
810
import { GuardsConsumer } from '../../guards/guards-consumer';
911
import { GuardsContextCreator } from '../../guards/guards-context-creator';
1012
import { NestContainer } from '../../injector/container';
@@ -15,8 +17,6 @@ import { PipesContextCreator } from '../../pipes/pipes-context-creator';
1517
import { RouteParamsFactory } from '../../router/route-params-factory';
1618
import { RouterExecutionContext } from '../../router/router-execution-context';
1719
import { NoopHttpAdapter } from '../utils/noop-adapter.spec';
18-
import { FORBIDDEN_MESSAGE } from '../../guards/constants';
19-
import { ForbiddenException } from '@nestjs/common/exceptions/forbidden.exception';
2020

2121
describe('RouterExecutionContext', () => {
2222
let contextCreator: RouterExecutionContext;
@@ -390,7 +390,7 @@ describe('RouterExecutionContext', () => {
390390
});
391391

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

0 commit comments

Comments
 (0)