Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ to enable, for `driver.fetchLogs()` and for `enableDebugCapture()`. Defaults to
(Note: Supported by Chrome, but not Firefox, as of June 2019.)
- `MOCHA_WEBDRIVER_STACKTRACES`: Enhance stack traces with async frames, if set to a non-empty
value.
- `MOCHA_WEBDRIVER_IGNORE_CHROME_VERSION`: Disable chromedriver's check that it supports the installed version of Chrome. Normally the installed chromedriver (controlled by the version in `yarn.lock`) must [match Chrome's version](https://chromedriver.chromium.org/downloads/version-selection). When tests are run by different developers and test environments, that can cause difficulties. On the other hand, incompatible behavior is rare, so this option offers a practical workaround.
- `MOCHA_WEBDRIVER_IGNORE_CHROME_VERSION`: Disable chromedriver's check that it supports the installed version of Chrome. Normally the installed chromedriver (controlled by the version in `package-lock.json`) must [match Chrome's version](https://chromedriver.chromium.org/downloads/version-selection). When tests are run by different developers and test environments, that can cause difficulties. On the other hand, incompatible behavior is rare, so this option offers a practical workaround.
- `MOCHA_WEBDRIVER_NO_CONTROL_BANNER`: suppress the "Chrome is being controlled by automated test software" banner. This banner may cause Chrome (as of version 79) to ignore clicks immediately after loading a page.
- `MOCHA_WEBDRIVER_SKIP_CLEANUP`: stops the library from cleaning up the driver, or doing any of the special termination behavior. When running tests in parallel, mocha will call set up and clean up at the test file level, so there may be a speed-up possible by skipping clean up and reusing the driver within individual test worker processes. But you'll need to clean up browser processes yourself.

Expand Down
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export function getMochaHooks() {

async function cleanup(context: IMochaContext) {
// Start all cleanup in parallel, so that hangup of driver.quit does not block other cleanup.
const promises: Array<Promise<void>> = [];
const promises: Promise<void>[] = [];
if (_driver) { promises.push(_driver.quit()); }

// Stop all servers registered with useServer().
Expand Down
2 changes: 1 addition & 1 deletion lib/serialize-calls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type PromiseFunc = (...args: any[]) => Promise<any>;

export function serializeCalls<Func extends PromiseFunc>(method: Func, maxPendingCalls: number): Func {
// Queue of all calls that haven't yet started. Calling a callback here starts the call.
const queue: Array<() => any> = [];
const queue: (() => any)[] = [];

// Number of calls we've made and are waiting to get resolved.
let running: number = 0;
Expand Down
Loading