Skip to content

Commit

Permalink
test: improve stability (#2615)
Browse files Browse the repository at this point in the history
* Use a higher timeout in mocha (10s instead of 2s).
* Decrease the concurrency (2 instead of 4)
  • Loading branch information
nicojs committed Nov 12, 2020
1 parent 41f6b85 commit 36f0bb9
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 11 deletions.
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -54,8 +54,7 @@
"generate": "node tasks/generate-json-schema-to-ts.js && node tasks/generate-mono-schema.js",
"prebuild": "npm run generate",
"build": "tsc -b && lerna run build",
"test": "npm run mocha",
"mocha": "lerna run test --stream --concurrency 4",
"test": "lerna run test --stream --concurrency 2",
"e2e": "cd e2e && npm ci && npm t && cd ..",
"perf": "cd perf && npm ci && npm t && cd ..",
"start": "tsc -b -w",
Expand Down
3 changes: 2 additions & 1 deletion packages/api/.mocharc.jsonc
@@ -1,3 +1,4 @@
{
"require": ["test/setup.js"]
"require": ["test/setup.js"],
"timeout": 10000
}
3 changes: 2 additions & 1 deletion packages/core/.mocharc.jsonc
@@ -1,3 +1,4 @@
{
"require": ["./test/setup.js"]
"require": ["./test/setup.js"],
"timeout": 10000
}
Expand Up @@ -7,7 +7,7 @@ import { expect } from 'chai';
import { JasmineTestRunner } from '../../src';

describe(JasmineTestRunner.name, () => {
it('should not leak memory when running multiple times (#2461)', async () => {
it('should not leak memory when running multiple times (#2461)', async function () {
const childProcess = await execa.node(path.resolve(__dirname, 'memory-leak.worker.js'), [], {
stdio: 'pipe',
nodeOptions: ['--max-old-space-size=32', '--max-semi-space-size=1'],
Expand Down
3 changes: 2 additions & 1 deletion packages/jest-runner/.mocharc.jsonc
@@ -1,3 +1,4 @@
{
"require": "test/setup.js"
"require": "test/setup.js",
"timeout": 10000
}
3 changes: 2 additions & 1 deletion packages/karma-runner/.mocharc.jsonc
@@ -1,3 +1,4 @@
{
"require": "test/setup.js"
"require": "test/setup.js",
"timeout": 10000
}
3 changes: 2 additions & 1 deletion packages/mocha-runner/.mocharc.jsonc
@@ -1,3 +1,4 @@
{
"require": "test/setup.js"
"require": "test/setup.js",
"timeout": 10000
}
3 changes: 2 additions & 1 deletion packages/typescript-checker/.mocharc.jsonc
@@ -1,3 +1,4 @@
{
"require": ["dist/test/setup.js"]
"require": ["dist/test/setup.js"],
"timeout": 10000
}
2 changes: 1 addition & 1 deletion packages/typescript-checker/package.json
Expand Up @@ -8,7 +8,7 @@
"mocha": "mocha",
"test:all": "npm run test:unit && npm run test:integration",
"test:unit": "mocha 'dist/test/unit/**/*.js'",
"test:integration": "mocha --timeout 10000 'dist/test/integration/**/*.js'",
"test:integration": "mocha 'dist/test/integration/**/*.js'",
"stryker": "node ../core/bin/stryker run"
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion packages/util/.mocharc.jsonc
@@ -1,3 +1,4 @@
{
"require": ["test/setup.js"]
"require": ["test/setup.js"],
"timeout": 10000
}

0 comments on commit 36f0bb9

Please sign in to comment.