Test fixes

This commit is contained in:
Jori Lallo
2016-09-11 12:09:45 -07:00
parent 458735f341
commit 1b14152291
3 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,7 @@
"test": "npm run test:frontend && npm run test:server", "test": "npm run test:frontend && npm run test:server",
"test:frontend": "jest", "test:frontend": "jest",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"test:server": "jest --config=server/.jest-config" "test:server": "jest --config=server/.jest-config --runInBand"
}, },
"jest": { "jest": {
"verbose": false, "verbose": false,

View File

@ -6,5 +6,6 @@
"setupFiles": [ "setupFiles": [
"<rootDir>/__mocks__/console.js", "<rootDir>/__mocks__/console.js",
"./server/test/helper.js" "./server/test/helper.js"
] ],
"testEnvironment": "node"
} }

View File

@ -7,8 +7,8 @@ import { flushdb, seed, sequelize } from '../test/support';
const server = new TestServer(app.callback()); const server = new TestServer(app.callback());
beforeEach(flushdb);
beforeEach(seed); beforeEach(seed);
afterEach(flushdb);
afterAll(() => server.close()); afterAll(() => server.close());
afterAll(() => sequelize.close()); afterAll(() => sequelize.close());