@@ -4,11 +4,11 @@ import { NestMiddleware } from '../../middlewares/interfaces/nest-middleware.int
44import { Component } from '../../../common/utils/component.decorator' ;
55import { MiddlewareBuilder } from '../../middlewares/builder' ;
66import { MiddlewaresModule } from '../../middlewares/middlewares-module' ;
7- import { UnkownMiddlewareException } from '../../../errors/exceptions/unkown-middleware.exception' ;
87import { InvalidMiddlewareException } from '../../../errors/exceptions/invalid-middleware.exception' ;
98import { RequestMethod } from '../../../common/enums/request-method.enum' ;
109import { Controller } from '../../../common/utils/controller.decorator' ;
1110import { RequestMapping } from '../../../common/utils/request-mapping.decorator' ;
11+ import { RuntimeException } from '../../../errors/exceptions/runtime.exception' ;
1212
1313describe ( 'MiddlewaresModule' , ( ) => {
1414 @Controller ( { path : 'test' } )
@@ -48,7 +48,7 @@ describe('MiddlewaresModule', () => {
4848
4949 describe ( 'setupRouteMiddleware' , ( ) => {
5050
51- it ( 'should throw "UnkownMiddlewareException " exception when middlewares is not stored in container' , ( ) => {
51+ it ( 'should throw "RuntimeException " exception when middlewares is not stored in container' , ( ) => {
5252 const route = { path : 'Test' } ;
5353 const configuration = {
5454 middlewares : [ TestMiddleware ] ,
@@ -60,7 +60,7 @@ describe('MiddlewaresModule', () => {
6060
6161 expect ( MiddlewaresModule . setupRouteMiddleware . bind (
6262 MiddlewaresModule , route , configuration , < any > 'Test' , < any > app
63- ) ) . throws ( UnkownMiddlewareException ) ;
63+ ) ) . throws ( RuntimeException ) ;
6464 } ) ;
6565
6666 it ( 'should throw "InvalidMiddlewareException" exception when middlewares does not have "resolve" method' , ( ) => {
0 commit comments