chore: add testing framework (jest) and start writing test for tracks logic
This commit is contained in:
parent
bd815e9671
commit
b95d3dad3a
8
logic/tracks.test.js
Normal file
8
logic/tracks.test.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
var {addPointsToTrack} = require('./tracks')
|
||||||
|
|
||||||
|
describe('addPointsToTrack', () => {
|
||||||
|
it('is a function', () => {
|
||||||
|
expect(typeof addPointsToTrack).toBe('function')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
4583
package-lock.json
generated
4583
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -7,7 +7,8 @@
|
||||||
"mongo:start": "docker run --name realworld-mongo -p 27017:27017 mongo & sleep 5",
|
"mongo:start": "docker run --name realworld-mongo -p 27017:27017 mongo & sleep 5",
|
||||||
"start": "node ./app.js",
|
"start": "node ./app.js",
|
||||||
"dev": "nodemon ./app.js",
|
"dev": "nodemon ./app.js",
|
||||||
"mongo:stop": "docker stop realworld-mongo && docker rm realworld-mongo"
|
"mongo:stop": "docker stop realworld-mongo && docker rm realworld-mongo",
|
||||||
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
"express": "4.17.1",
|
"express": "4.17.1",
|
||||||
"express-jwt": "^6.0.0",
|
"express-jwt": "^6.0.0",
|
||||||
"express-session": "1.17.1",
|
"express-session": "1.17.1",
|
||||||
|
"jest": "^26.6.3",
|
||||||
"joi": "^17.2.1",
|
"joi": "^17.2.1",
|
||||||
"jsonwebtoken": "8.5.1",
|
"jsonwebtoken": "8.5.1",
|
||||||
"latest": "^0.2.0",
|
"latest": "^0.2.0",
|
||||||
|
@ -40,5 +42,8 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"newman": "^5.2.0",
|
"newman": "^5.2.0",
|
||||||
"nodemon": "^2.0.4"
|
"nodemon": "^2.0.4"
|
||||||
|
},
|
||||||
|
"jest": {
|
||||||
|
"modulePathIgnorePatterns": ["local"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue