Skip to content

Commit 3df86fb

Browse files
NEXT-274 - fixed tests
1 parent 637ada2 commit 3df86fb

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

config/test.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"port": 3031,
3+
"baseURL": "http://localhost:3031",
4+
"seeder": {
5+
"runOnInit": false,
6+
"dropDatabase": false
7+
},
8+
"mongodb": "mongodb://localhost:27017/hc_api_test"
9+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"dev-win": "npm run clear && concurrently \"mongod --dbpath data\" \"wait-on tcp:27017&&SET NODE_ENV=development&& nodemon --inspect server/\"",
4343
"dev-noseed": "concurrently 'mongod --dbpath data' 'wait-on tcp:27017 && NODE_ENV=development nodemon --inspect server/'",
4444
"dev-win-noseed": "concurrently \"mongod --dbpath data\" \"wait-on tcp:27017 && nodemon --inspect server/\"",
45-
"mocha": "mocha test/ --recursive"
45+
"mocha": "npm run clear && concurrently --success first --kill-others 'mongod --dbpath data &>/dev/null' 'wait-on tcp:27017 && NODE_ENV=test mocha test/ --recursive --timeout 10000 --exit'"
4646
},
4747
"dependencies": {
4848
"body-parser": "~1.18.2",

test/services/status.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const app = require('../../server/app');
44
describe('\'status\' service', () => {
55
const service = app.service('status');
66

7-
beforeEach(async () => {
8-
await service.update({}, {
7+
beforeEach(() => {
8+
return service.update({}, {
99
maintenance: false
1010
}, { secret: app.get('apiSecret') });
1111
});

0 commit comments

Comments
 (0)