Skip to content

Commit 2cfd6e9

Browse files
testing some testing options
1 parent 55e9754 commit 2cfd6e9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"start": "node app.js",
99
"watch": "nodemon --exec npm run start",
10-
"test": "jest",
10+
"test": "jest --forceExit",
1111
"build": "babel src -d build && npm run pretty",
1212
"pretty": "prettier --write --print-width 80 --single-quote --trailing-comma es5 --tab-width 4 'src/**/*.js' 'models/**/*.js' 'middleware/**/*.js' 'config/**/*.js'",
1313
"start-production": "pm2 start ecosystem.json",

tests/test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const axios = require('axios')
22
const app = require('../app')
3-
const url = `http://localhost:4000/api/v1/`
3+
const url = `http://localhost:4000`
44
const request = axios.create({ baseURL: url })
55

6-
it('return homepage', async () => {
6+
it('returns homepage', async () => {
7+
expect.assertions(1)
78
const response = await request.get('/')
8-
expect(response.statusCode).toBe(200)
9-
done()
10-
});
9+
expect(response.status).toBe(200)
10+
});

0 commit comments

Comments
 (0)