From ca4cb4c7ff720bd6472ffb36a03e68ec6c5f81c5 Mon Sep 17 00:00:00 2001 From: Jack Franklin Date: Thu, 16 Apr 2020 15:36:37 +0100 Subject: [PATCH 1/2] chore: Update CONTRIBUTING.md file This was missed in the Mocha migration. The options I've removed from the docs were removed from the code; I didn't think it worth implementing them in Mocha land until we definitely needed them. So shout if you miss any of the options! --- CONTRIBUTING.md | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index de3f5eb018b54..17cfce2604d1d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -171,12 +171,11 @@ npm run unit -- --verbose npm run unit -- --break-on-failure ``` -- To run a specific test, substitute the `it` with `fit` (mnemonic rule: '*focus it*'): +- To run a specific test, substitute the `it` with `it.only`: '*focus it*'): ```js ... - // Using "fit" to run specific test - fit('should work', async function({server, page}) { + it.only('should work', async function({server, page}) { const response = await page.goto(server.EMPTY_PAGE); expect(response.ok).toBe(true); }); @@ -205,25 +204,6 @@ HEADLESS=false npm run unit BINARY= npm run unit ``` -- To run tests in slow-mode: - -```bash -HEADLESS=false SLOW_MO=500 npm run unit -``` - -- To run tests with additional Launcher options: - -```bash -EXTRA_LAUNCH_OPTIONS='{"args": ["--user-data-dir=some/path"], "handleSIGINT": true}' npm run unit -``` - - -- To debug a test, "focus" a test first and then run: - -```bash -node --inspect-brk test/test.js -``` - ## Public API Coverage Every public API method or event should be called at least once in tests. To ensure this, there's a `coverage` command which tracks calls to public API and reports back if some methods/events were not called. From 63bbec7fc2cbf55336628b2708a241a69949b8b5 Mon Sep 17 00:00:00 2001 From: Jack Franklin Date: Fri, 17 Apr 2020 09:45:39 +0100 Subject: [PATCH 2/2] Update CONTRIBUTING.md Co-Authored-By: Mathias Bynens --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17cfce2604d1d..0014ed0f96050 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -171,7 +171,7 @@ npm run unit -- --verbose npm run unit -- --break-on-failure ``` -- To run a specific test, substitute the `it` with `it.only`: '*focus it*'): +- To run a specific test, substitute the `it` with `it.only`: ```js ...