Skip to content

Commit

Permalink
Merge pull request #4633 from apatryda/4632-tests-should-run-ootb
Browse files Browse the repository at this point in the history
test: fix tests to make them run ootb
  • Loading branch information
kamilmysliwiec committed Apr 23, 2020
2 parents aaf4cb5 + f2726c1 commit f4d8fad
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/common/test/decorators/bind.decorator.spec.ts
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import { ROUTE_ARGS_METADATA } from '../../constants';
import { Bind } from '../../decorators/core/bind.decorator';
import { ROUTE_ARGS_METADATA } from '@nestjs/common/constants';
import { Req } from '../../decorators/http/route-params.decorator';

describe('@Bind', () => {
Expand Down
@@ -1,7 +1,7 @@
import { ParseIntPipe } from '@nestjs/common';
import { ROUTE_ARGS_METADATA } from '@nestjs/common/constants';
import { expect } from 'chai';
import { ROUTE_ARGS_METADATA } from '../../constants';
import { createParamDecorator } from '../../decorators/http/create-route-param-metadata.decorator';
import { ParseIntPipe } from '../../index';

describe('createParamDecorator', () => {
let result;
Expand Down
4 changes: 2 additions & 2 deletions packages/common/test/decorators/redirect.decorator.spec.ts
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import { Redirect } from '../../decorators/http/redirect.decorator';
import { REDIRECT_METADATA } from '../../constants';
import { HttpStatus } from '@nestjs/common';
import { Redirect } from '../../decorators/http/redirect.decorator';
import { HttpStatus } from '../../index';

describe('@Redirect', () => {
const url = 'http://test.com';
Expand Down
3 changes: 3 additions & 0 deletions packages/core/package.json
Expand Up @@ -35,6 +35,9 @@
"tslib": "1.11.1",
"uuid": "7.0.3"
},
"devDependencies": {
"@nestjs/common": "^7.0.0"
},
"peerDependencies": {
"@nestjs/common": "^7.0.0",
"reflect-metadata": "^0.1.12",
Expand Down
4 changes: 4 additions & 0 deletions packages/microservices/package.json
Expand Up @@ -21,6 +21,10 @@
"json-socket": "0.3.0",
"tslib": "1.11.1"
},
"devDependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0"
},
"peerDependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/microservices/test/server/server-grpc.spec.ts
@@ -1,12 +1,12 @@
import { Logger } from '@nestjs/common';
import { GrpcMethodStreamingType } from '@nestjs/microservices';
import { expect } from 'chai';
import { join } from 'path';
import { of } from 'rxjs';
import * as sinon from 'sinon';
import { CANCEL_EVENT } from '../../constants';
import { InvalidGrpcPackageException } from '../../errors/invalid-grpc-package.exception';
import { GrpcMethodStreamingType } from '../../index';
import { ServerGrpc } from '../../server/server-grpc';
import { CANCEL_EVENT } from '../../constants';

class NoopLogger extends Logger {
log(message: any, context?: string): void {}
Expand Down
8 changes: 4 additions & 4 deletions packages/microservices/test/server/server-kafka.spec.ts
@@ -1,12 +1,12 @@
import { Logger } from '@nestjs/common';
import {
EachMessagePayload,
KafkaMessage,
} from '@nestjs/microservices/external/kafka.interface';
import { expect } from 'chai';
import * as sinon from 'sinon';
import { NO_MESSAGE_HANDLER } from '../../constants';
import { KafkaHeaders } from '../../enums';
import {
EachMessagePayload,
KafkaMessage,
} from '../../external/kafka.interface';
import { ServerKafka } from '../../server';

class NoopLogger extends Logger {
Expand Down
4 changes: 4 additions & 0 deletions packages/platform-express/package.json
Expand Up @@ -23,6 +23,10 @@
"multer": "1.4.2",
"tslib": "1.11.1"
},
"devDependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0"
},
"peerDependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0"
Expand Down
4 changes: 4 additions & 0 deletions packages/websockets/package.json
Expand Up @@ -15,6 +15,10 @@
"iterare": "1.2.0",
"tslib": "1.11.1"
},
"devDependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0"
},
"peerDependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0",
Expand Down

0 comments on commit f4d8fad

Please sign in to comment.