Skip to content

Commit

Permalink
tests(core) fix middleware utils unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Oct 6, 2018
1 parent 0e71949 commit 72616cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 94 deletions.
69 changes: 0 additions & 69 deletions packages/common/test/cache/cache.module.spec.ts

This file was deleted.

22 changes: 0 additions & 22 deletions packages/common/test/cache/cache.providers.spec.ts

This file was deleted.

6 changes: 3 additions & 3 deletions packages/core/middleware/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Type } from '@nestjs/common/interfaces';
import { isFunction } from '@nestjs/common/utils/shared.utils';
import * as uuid from 'uuid/v4';

export const filterMiddleware = middleware => {
return []
Expand All @@ -23,8 +24,7 @@ export function isClass(middleware: any) {
return middleware.toString().substring(0, 5) === 'class';
}

export function assignToken(this: any, metatype): Type<any> {
this.id = this.id || 1;
Object.defineProperty(metatype, 'name', { value: ++this.id });
export function assignToken(metatype): Type<any> {
Object.defineProperty(metatype, 'name', { value: uuid() });
return metatype;
}

0 comments on commit 72616cc

Please sign in to comment.