diff --git a/Makefile b/Makefile index c8fd31b..24b454e 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/package.json b/package.json index 39814fc..1acdbe9 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/src/client/__tests__/App-test.js b/src/client/__tests__/App-test.js index 30ae709..0a1fcd9 100644 --- a/src/client/__tests__/App-test.js +++ b/src/client/__tests__/App-test.js @@ -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' diff --git a/src/client/actions/__tests__/CallActions-test.js b/src/client/actions/__tests__/CallActions-test.js index 052b652..c3789b2 100644 --- a/src/client/actions/__tests__/CallActions-test.js +++ b/src/client/actions/__tests__/CallActions-test.js @@ -24,8 +24,7 @@ describe('reducers/alerts', () => { afterEach(() => { jest.runAllTimers() - socket.removeAllListeners('connect') - socket.removeAllListeners('disconnect') + socket.removeAllListeners() }) describe('init', () => {