Skip to content

Commit f105370

Browse files
committed
fix(tests): Set PAUSE_TIME to 0
It's very useful to be able to make tests run more slowly so you can watch them, but they should run as fast as possible by default. This cuts total test execution time on a 2021 MacBook Pro M1 approximately in half, from 42s to 22s.
1 parent 14d619c commit f105370

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

test/webdriverio/test/test_setup.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,22 @@ import {fileURLToPath} from 'url';
2727
let driver: webdriverio.Browser | null = null;
2828

2929
/**
30-
* The default amount of time to wait during a test. Increase this to make
31-
* tests easier to watch; decrease it to make tests run faster.
30+
* The default amount of time to wait during a test, in ms. Increase
31+
* this to make tests easier to watch; decrease it to make tests run
32+
* faster.
33+
*
34+
* The _test.js files in this directory are set up to disable timeouts
35+
* automatically when PAUSE_TIME is set to a nonzero value via
36+
*
37+
* if (PAUSE_TIME) this.timeout(0);
38+
*
39+
* at the top of each suite.
40+
*
41+
* Tests should pass reliably even with this set to zero; use one of
42+
* the browser.wait* functions if you need your test to wait for
43+
* something to happen after sending input.
3244
*/
33-
export const PAUSE_TIME = 50;
45+
export const PAUSE_TIME = 0;
3446

3547
/**
3648
* Start up WebdriverIO and load the test page. This should only be

0 commit comments

Comments
 (0)