Skip to content

Commit

Permalink
chore: update packages and adjust jest-when usage
Browse files Browse the repository at this point in the history
nartc committed Mar 22, 2021
1 parent 54fe31b commit 0de92b9
Showing 3 changed files with 676 additions and 16,394 deletions.
17,012 changes: 650 additions & 16,362 deletions package-lock.json

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -58,45 +58,45 @@
],
"dependencies": {},
"devDependencies": {
"@nestjs/common": "7.6.12",
"@nestjs/core": "7.6.12",
"@nestjs/platform-express": "7.6.12",
"@nestjs/schematics": "7.2.7",
"@nestjs/testing": "7.6.12",
"@nrwl/cli": "11.5.1",
"@nrwl/eslint-plugin-nx": "11.5.1",
"@nrwl/jest": "11.5.1",
"@nrwl/nest": "11.5.1",
"@nrwl/node": "11.5.1",
"@nrwl/tao": "11.5.1",
"@nrwl/workspace": "11.5.1",
"@nestjs/common": "7.6.15",
"@nestjs/core": "7.6.15",
"@nestjs/platform-express": "7.6.15",
"@nestjs/schematics": "7.3.0",
"@nestjs/testing": "7.6.15",
"@nrwl/cli": "11.5.2",
"@nrwl/eslint-plugin-nx": "11.5.2",
"@nrwl/jest": "11.5.2",
"@nrwl/nest": "11.5.2",
"@nrwl/node": "11.5.2",
"@nrwl/tao": "11.5.2",
"@nrwl/workspace": "11.5.2",
"@release-it/bumper": "2.0.0",
"@release-it/conventional-changelog": "2.0.0",
"@types/jest": "26.0.20",
"@release-it/conventional-changelog": "2.0.1",
"@types/jest": "26.0.21",
"@types/jest-when": "2.7.2",
"@types/node": "14.14.28",
"@types/node": "14.14.35",
"@types/sequelize": "4.28.9",
"@types/supertest": "2.0.10",
"@typescript-eslint/eslint-plugin": "4.15.1",
"@typescript-eslint/parser": "4.15.1",
"@typescript-eslint/eslint-plugin": "4.18.0",
"@typescript-eslint/parser": "4.18.0",
"all-contributors-cli": "6.20.0",
"commitizen": "4.2.3",
"cz-conventional-changelog": "3.3.0",
"dotenv": "8.2.0",
"eslint": "7.20.0",
"eslint": "7.22.0",
"eslint-config-prettier": "8.1.0",
"husky": "5.0.9",
"husky": "5.2.0",
"jest": "26.6.3",
"jest-createspyobj": "2.0.0",
"jest-when": "3.2.0",
"jest-when": "3.2.1",
"lint-staged": "10.5.4",
"prettier": "2.2.1",
"reflect-metadata": "0.1.13",
"release-it": "14.4.0",
"rxjs": "~6.6.3",
"sequelize": "6.5.0",
"release-it": "14.5.0",
"rxjs": "~6.6.6",
"sequelize": "6.6.1",
"supertest": "6.1.3",
"ts-jest": "26.5.1",
"ts-jest": "26.5.4",
"ts-node": "9.1.1",
"tslib": "2.0.3",
"typescript": "4.0.5"
10 changes: 2 additions & 8 deletions packages/classes/src/lib/utils/specs/instantiate.util.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createSpyObj } from 'jest-createspyobj';
import { resetAllWhenMocks, when } from 'jest-when';
import { ClassInstanceStorage, ClassMetadataStorage } from '../../storages';
import { Constructible } from '../../types';
import { instantiate } from '../instantiate.util';

describe('instantiate', () => {
@@ -124,13 +123,8 @@ describe('instantiate', () => {
});
});

function fooMatcher(model: Constructible) {
return model === Foo;
}

function barMatcher(model: Constructible) {
return model === Bar;
}
const fooMatcher = when(((model) => model === Foo) as any);
const barMatcher = when(((model) => model === Bar) as any);

function mockEmpty() {
when(mockedInstanceStorage.getDepthAndCount)

0 comments on commit 0de92b9

Please sign in to comment.