Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update CONTRIBUTING.md file #5657

Merged
merged 2 commits into from Apr 17, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 2 additions & 22 deletions CONTRIBUTING.md
Expand Up @@ -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*'):
jackfranklin marked this conversation as resolved.
Show resolved Hide resolved

```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);
});
Expand Down Expand Up @@ -205,25 +204,6 @@ HEADLESS=false npm run unit
BINARY=<path-to-executable> 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.
Expand Down