test: fix testing problem

This commit is contained in:
曾明健
2023-01-04 10:12:16 +00:00
parent 5deabef549
commit 58ee3bf2f3
2 changed files with 8 additions and 1 deletions

View File

@@ -23,7 +23,11 @@ describe('ApplicationConfig', () => {
it('should set global path options', () => {
const options: GlobalPrefixOptions<ExcludeRouteMetadata> = {
exclude: [
{ pathRegex: new RegExp(/health/), requestMethod: RequestMethod.GET },
{
pathRegex: new RegExp(/health/),
requestMethod: RequestMethod.GET,
path: 'health',
},
],
};
appConfig.setGlobalPrefixOptions(options);

View File

@@ -249,6 +249,7 @@ describe('RoutePathFactory', () => {
{
pathRegex: pathToRegexp('/random'),
requestMethod: RequestMethod.ALL,
path: '/random',
},
],
});
@@ -267,6 +268,7 @@ describe('RoutePathFactory', () => {
{
pathRegex: pathToRegexp('/cats'),
requestMethod: RequestMethod.ALL,
path: '/cats',
},
],
});
@@ -285,6 +287,7 @@ describe('RoutePathFactory', () => {
{
pathRegex: pathToRegexp('/cats'),
requestMethod: RequestMethod.GET,
path: '/cats',
},
],
});