Commit Graph

6 Commits

Author SHA1 Message Date
Jack Franklin
523aa0aafa
chore: upgrade and pin prettier dependencies (#7232)
We're seeing odd failures with Prettier on some CI branches; my hunch is that they are installing different versions of the package and therefore getting formatting conflicts. This PR updates them all and pins them to specific versions - something we should probably consider generally, or remove our `package-lock.json` from the gitignore.
2021-05-12 16:48:30 +02:00
Jan Scheffler
a293b96952 chore: disable flaky test on Firefox
Issue: #7182
2021-05-03 10:48:29 +02:00
Mathias Bynens
a63f53c938
fix: add favicon test asset (#6868)
The favicon was taken from https://github.com/mathiasbynens/small.

Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1682076
2021-02-11 11:54:45 +00:00
Jack Franklin
ffec2475d0
chore: enforce file extensions on imports (#6202)
* chore: enforce file extensions on imports

To make our output agnostic it should include file extensions in the
output, as per the ESM spec. It's a bit odd for Node packages but makes
it easier to publish a browser build.
2020-07-13 10:22:26 +01:00
Jack Franklin
6474edb9ba
feat(types): add types for $eval (#6135)
This pulls in the types (based on the DefinitelyTyped repo) for
`page.$eval` (and the `$eval` method on other classes). The `$eval`
method is quite hard to type due to the way we wrap and unwrap
ElementHandles that are passed to / returned from the `pageFunction`
that users provide.

Longer term we can improve the types by providing type overloads as
DefinitelyTyped does but I've deferred that for now (see the `TODO` in
the code for more details).
2020-07-02 10:09:34 +01:00
Jack Franklin
28797dee41
chore: migrate tests to TypeScript (#6075)
This CL migrates all the tests to TypeScript. The main benefits of this is that we start consuming our TypeScript definitions and therefore find errors in them. The act of migrating found some bugs in our definitions and now we can be sure to avoid them going forwards.

You'll notice the addition of some `TODO`s in the code; I didn't want this CL to get any bigger than it already is but I intend to follow those up once this lands. It's mostly figuring out how to extend the `expect` types with our `toBeGolden` helpers and some other slight confusions with types that the tests exposed.

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-06-23 07:18:46 +02:00