mirror of
https://github.com/leon-ai/leon.git
synced 2024-11-24 12:45:58 +03:00
chore: force Jest to exit if a process is still running
This commit is contained in:
parent
4cddb702f2
commit
86dd7fae91
@ -23,10 +23,10 @@
|
||||
"scripts": {
|
||||
"lint": "babel-node scripts/lint.js",
|
||||
"test": "npm run test:json && npm run test:unit && npm run test:e2e",
|
||||
"test:unit": "npm run train expressions:en && cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --silent --projects test/unit/unit.jest.json && npm run train expressions",
|
||||
"test:unit": "npm run train expressions:en && cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --forceExit --silent --projects test/unit/unit.jest.json && npm run train expressions",
|
||||
"test:e2e": "npm run test:e2e:nlp-modules && npm run test:e2e:modules",
|
||||
"test:e2e:modules": "npm run train expressions:en && cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --silent --verbose --projects test/e2e/modules/e2e.modules.jest.json && npm run train expressions",
|
||||
"test:e2e:nlp-modules": "npm run train expressions:en && cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --silent --verbose --setupTestFrameworkScriptFile=./test/paths.setup.js test/e2e/nlp-modules.spec.js && npm run train expressions",
|
||||
"test:e2e:modules": "npm run train expressions:en && cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --forceExit --silent --verbose --projects test/e2e/modules/e2e.modules.jest.json && npm run train expressions",
|
||||
"test:e2e:nlp-modules": "npm run train expressions:en && cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --forceExit --silent --verbose --setupTestFrameworkScriptFile=./test/paths.setup.js test/e2e/nlp-modules.spec.js && npm run train expressions",
|
||||
"test:json": "jest --silent --projects test/json/json.jest.json",
|
||||
"test:module": "babel-node scripts/test-module.js",
|
||||
"setup:offline": "babel-node scripts/setup-offline/setup-offline.js",
|
||||
|
@ -101,10 +101,12 @@ describe('server', () => {
|
||||
ee.emit('recognize', 'blob')
|
||||
}, 150)
|
||||
|
||||
setTimeout(() => {
|
||||
setTimeout(async () => {
|
||||
expect(console.log.mock.calls[0][1]).toBe('ASR')
|
||||
console.log = jest.fn()
|
||||
|
||||
await server.httpServer.close()
|
||||
|
||||
done()
|
||||
}, 200)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user