feat: added test deps

This commit is contained in:
Roberto Tonino 2021-04-09 18:45:32 +02:00
parent 1bf94ea65d
commit eb91ff06d6
4 changed files with 2842 additions and 52 deletions

View file

@ -3,5 +3,8 @@ NODE_BIN ?= .\node_modules\.bin
lint: lint:
@$(NODE_BIN)\eslint ./src/** --fix @$(NODE_BIN)\eslint ./src/** --fix
build: lint test:
@$(NODE_BIN)\jest
build: lint test
@$(NODE_BIN)\tsc @$(NODE_BIN)\tsc

6
server/jest.config.js Normal file
View file

@ -0,0 +1,6 @@
module.exports = {
clearMocks: true,
roots: ['<rootDir>/src'],
testEnvironment: 'node',
preset: 'ts-jest'
}

View file

@ -8,7 +8,9 @@
"start-build": "node dist/app.js", "start-build": "node dist/app.js",
"lint": "eslint . --fix", "lint": "eslint . --fix",
"prebuild": "yarn lint", "prebuild": "yarn lint",
"build": "tsc" "build": "tsc",
"test": "jest",
"test-watch": "jest --watch"
}, },
"dependencies": { "dependencies": {
"cookie-parser": "1.4.5", "cookie-parser": "1.4.5",
@ -21,15 +23,20 @@
"@types/cookie-parser": "1.4.2", "@types/cookie-parser": "1.4.2",
"@types/debug": "4.1.5", "@types/debug": "4.1.5",
"@types/express": "4.17.11", "@types/express": "4.17.11",
"@types/jest": "26.0.22",
"@types/morgan": "1.9.2", "@types/morgan": "1.9.2",
"@types/node": "14.14.37", "@types/node": "14.14.37",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.21.0", "@typescript-eslint/eslint-plugin": "4.21.0",
"@typescript-eslint/parser": "4.21.0", "@typescript-eslint/parser": "4.21.0",
"eslint": "7.23.0", "eslint": "7.23.0",
"eslint-config-prettier": "^8.1.0", "eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "3.3.1", "eslint-plugin-prettier": "3.3.1",
"jest": "26.6.3",
"nodemon": "2.0.7", "nodemon": "2.0.7",
"prettier": "2.2.1", "prettier": "2.2.1",
"supertest": "6.1.3",
"ts-jest": "26.5.4",
"ts-node": "9.1.1", "ts-node": "9.1.1",
"ts-node-dev": "1.1.6", "ts-node-dev": "1.1.6",
"typescript": "4.2.4" "typescript": "4.2.4"

File diff suppressed because it is too large Load diff