Fix jest not exiting cleanly

This commit is contained in:
Jerko Steiner 2017-06-17 11:37:25 -04:00
parent b8ebbf8cc4
commit bcbf6b0291
4 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@ lint-fix:
.PHONY: test
test:
jest --forceExit
jest
.PHONY: testify
testify:
@ -52,7 +52,7 @@ testify:
.PHONY: coverage
coverage:
jest --coverage --forceExit
jest --coverage
.PHONY: server
server:

View File

@ -6,7 +6,7 @@
"main": "src/index.js",
"scripts": {
"start": "node src/index.js",
"test": "jest --coverage --forceExit",
"test": "jest --coverage",
"testify": "jest --watch",
"lint": "eslint ./index.js ./src/js"
},

View File

@ -1,6 +1,7 @@
jest.mock('../actions/CallActions.js')
jest.mock('../callId.js')
jest.mock('../iceServers.js')
jest.mock('../socket.js')
import * as constants from '../constants.js'
import App from '../containers/App.js'

View File

@ -24,8 +24,7 @@ describe('reducers/alerts', () => {
afterEach(() => {
jest.runAllTimers()
socket.removeAllListeners('connect')
socket.removeAllListeners('disconnect')
socket.removeAllListeners()
})
describe('init', () => {