Skip to content

Commit ea79985

Browse files
committedSep 13, 2020
chore: adding jest configuration
1 parent 5e83dd5 commit ea79985

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed
 

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
22
.idea
3-
3+
coverage

‎jest.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
};

‎package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1",
87
"build:backend": "tsc",
98
"build:frontend": "webpack",
9+
"dev-back": "nodemon --exec ts-node src/main.ts --watch src",
1010
"start": "node ./dist/main.js",
11-
"deploy": "npm run build:backend && npm run build:frontend && npm run start"
11+
"deploy": "npm run build:backend && npm run build:frontend && npm run start",
12+
"test": "jest --watch",
13+
"coverage": "jest --coverage"
1214
},
1315
"keywords": [],
1416
"author": "",
@@ -35,6 +37,7 @@
3537
},
3638
"dependencies": {
3739
"axios": "^0.20.0",
40+
"body-parser": "^1.19.0",
3841
"ejs": "^2.7.4",
3942
"express": "^4.17.1",
4043
"react": "^16.13.1",

‎tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"esModuleInterop": true
1010
},
1111
"include": ["./src"],
12-
"exclude": ["src/frontend"]
12+
"exclude": ["src/frontend","src/backend/test/**/*.spec.ts"]
1313
}

‎yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ bn.js@^5.1.1:
12091209
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b"
12101210
integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==
12111211

1212-
body-parser@1.19.0:
1212+
body-parser@1.19.0, body-parser@^1.19.0:
12131213
version "1.19.0"
12141214
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
12151215
integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==

0 commit comments

Comments
 (0)