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 .PHONY: test
test: test:
jest --forceExit jest
.PHONY: testify .PHONY: testify
testify: testify:
@ -52,7 +52,7 @@ testify:
.PHONY: coverage .PHONY: coverage
coverage: coverage:
jest --coverage --forceExit jest --coverage
.PHONY: server .PHONY: server
server: server:

View File

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

View File

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

View File

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