Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saisilinus committed Apr 7, 2022
1 parent d0afb24 commit 91b6aa9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions dist/modules/auth/auth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import httpStatus from 'http-status';
import httpMocks from 'node-mocks-http';
import moment from 'moment';
import bcrypt from 'bcryptjs';
import { jest } from '@jest/globals';
import app from '../../app';
import setupTestDB from '../jest/setupTestDB';
import User from '../user/user.model';
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js → jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
NODE_ENV: 'test',
},
restoreMocks: true,
coveragePathIgnorePatterns: ['node_modules', 'dist/config', 'dist/app.js', 'tests'],
coveragePathIgnorePatterns: ['node_modules', 'dist/config', 'dist/app.js'],
coverageReporters: ['text', 'lcov', 'clover', 'html'],
globals: {
'ts-jest': {
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"scripts": {
"start": "pm2 start ecosystem.config.json --no-daemon",
"dev": "cross-env NODE_ENV=development nodemon --experimental-modules --es-module-specifier-resolution=node dist/index.js",
"test": "jest -i --colors --verbose --detectOpenHandles",
"test:watch": "jest -i --watchAll",
"coverage": "jest -i --coverage",
"coverage:coveralls": "jest -i --coverage --coverageReporters=text-lcov | coveralls",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest -i --colors --verbose --detectOpenHandles",
"test:watch": "cross-env NODE_OPTIONS=--experimental-vm-modules jest -i --watchAll",
"coverage": "cross-env NODE_OPTIONS=--experimental-vm-modules jest -i --coverage",
"coverage:coveralls": "cross-env NODE_OPTIONS=--experimental-vm-modules jest -i --coverage --coverageReporters=text-lcov | coveralls",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prettier": "prettier --check **/*.js",
Expand All @@ -23,8 +23,7 @@
"docker:test": "docker-compose -f docker-compose.yml -f docker-compose.test.yml up",
"prepare": "husky install",
"compile": "tsc --build && eslint . --fix",
"compile:watch": "tsc --build src --watch",
"postinstall": "./node_modules/.bin/pm2 install typescript"
"compile:watch": "tsc --build src --watch"
},
"keywords": [
"node",
Expand Down
1 change: 1 addition & 0 deletions src/modules/auth/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import httpStatus from 'http-status';
import httpMocks from 'node-mocks-http';
import moment from 'moment';
import bcrypt from 'bcryptjs';
import { jest } from '@jest/globals';
import app from '../../app';
import setupTestDB from '../jest/setupTestDB';
import User from '../user/user.model';
Expand Down

0 comments on commit 91b6aa9

Please sign in to comment.