mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 12:33:47 +08:00
Fix base-mocharc and timeout overriding
Bug: chromium:1186163 Change-Id: I4c0838bba99a5fa28ac4ef68591f1076760afd9b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3117825 Auto-Submit: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
This commit is contained in:
committed by
Devtools-frontend LUCI CQ
parent
5dd04764eb
commit
d538e2f04d
@@ -60,9 +60,13 @@ Did you forget to add ${path.relative(process.cwd(), fileName)} to a BUILD.gn?\n
|
||||
return generatedFile;
|
||||
});
|
||||
|
||||
// We pull the timeout out of the extra mocha config, because whilst we want
|
||||
// to override the default if it is provided, we don't want to override it if
|
||||
// in DEBUG mode, where we set the timeout to 0.
|
||||
const {timeout: extraMochaConfigTimeout, ...restOfExtraMochaConfig} = extraMochaConfig;
|
||||
// When we are debugging, we don't want to timeout any test. This allows to inspect the state
|
||||
// of the application at the moment of the timeout. Here, 0 denotes "indefinite timeout".
|
||||
const timeout = process.env['DEBUG_TEST'] ? 0 : 5 * 1000;
|
||||
const timeout = process.env['DEBUG_TEST'] ? 0 : (extraMochaConfigTimeout || 5 * 1000);
|
||||
|
||||
const jobs = Number(process.env['JOBS']) || 1;
|
||||
const parallel = !process.env['DEBUG_TEST'] && jobs > 1;
|
||||
@@ -75,7 +79,7 @@ Did you forget to add ${path.relative(process.cwd(), fileName)} to a BUILD.gn?\n
|
||||
jobs,
|
||||
reporter: path.join(__dirname, 'shared', 'mocha-resultsdb-reporter'),
|
||||
suiteName,
|
||||
...extraMochaConfig,
|
||||
...restOfExtraMochaConfig,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user