Commit Graph

7 Commits

Author SHA1 Message Date
Jack Franklin
4fdb1e3cab
chore: add Prettier (#5825) 2020-05-07 12:54:55 +02:00
Jack Franklin
1ccfbcb684
chore: enforce naming of errors in catch blocks (#5763) 2020-04-28 15:16:28 +02:00
Jack Franklin
e3922ea1f3
chore: enforce consistent spacing around object curlys (#5700)
The codebase was incredibly inconsistent with the use of spacing around
curly braces, e.g.:

```
// this?
const a = {b: 1}
// or?
const a = { b: 1 }
```

This extended into import statements also. Google's styleguide is no
spacing, so we're going with that.
2020-04-21 10:40:04 +01:00
Jack Franklin
17cd8703f9
chore: migrate unit tests to Mocha (#5600)
Rather than maintain our own test runner we should instead lean on the community and use Mocha which is very popular and also our test runner of choice in DevTools too.

Note that this commit doesn't remove the TestRunner source as it's still used for other unit tests, but they will be updated in a future PR and then we can remove the TestRunner.

The main bulk of this PR is updating the tests as the old TestRunner passed in contextual data via the `it` function callback whereas Mocha does not, so we introduce some helpers for the tests to make it easier.
2020-04-09 07:56:25 +02:00
Andrey Lushnikov
e8a49633d9
test: cleanup tests (#4078)
- move Connection test into CDPSession.spec.js
- remove a nasty test that was reaching into implementation details
2019-02-26 20:36:55 -08:00
Andrey Lushnikov
06d61919ef
test: refactor utils.waitForEvents into utils.waitEvent (#2336)
This simplifies waiting for events in tests.
2018-04-09 15:46:05 -07:00
Yaniv Efraim
ebe17371b0 chore: break page.spec.js to smaller files (#2257)
Break some large chunks into smaller files. This change will remove ~600 lines from `page.spec.js`
2018-03-29 10:42:23 -07:00