playwright/utils
Dmitry Gozman d22dd4a4e7
feat(test runner): improve fixture typings for function fixtures (#9138)
When fixture value `R` is a function, TypeScript sometimes confuses
function `R` and function `async ({}, use) => {}`. This leads to
`any` types in the latter because it could be either of the functions
as TS thinks.

The solution is to only accept the second syntax, assuming that noone
passes fixture value that is a function as is:

```js
// This will stop working.
test.extend<{ foo: (x: number) => number }>({
  foo: x => 2 * x,
});

// This will get inferred types and autocomplete.
test.extend<{ foo: (x: number) => number }>({
  foo: async ({}, use) => {
    await use(x => 2 * x);
  },
});
```
2021-09-24 19:59:30 -07:00
..
build chore: use Node.js 14 (LTS) for driver (#8965) 2021-09-16 15:14:11 +02:00
docker chore(docker): upgrade to NPM 7 (#8915) 2021-09-22 16:38:50 +02:00
doclint feat(fetch): support options in playwright._newRequest (#9061) 2021-09-22 12:44:22 -07:00
flakiness-dashboard devops: flakiness dashboard to support new folio report (#6677) 2021-05-20 09:46:50 -07:00
generate_types feat(test runner): improve fixture typings for function fixtures (#9138) 2021-09-24 19:59:30 -07:00
linux-browser-dependencies chore: use bash instead of sh in code blocks (#6847) 2021-06-02 18:23:06 +02:00
protocol-types-generator chore(typescript): compile with babel, lint everything with tsc (#6872) 2021-06-23 18:01:48 -07:00
testserver test: unflake "should timeout in socket while connecting" (#9093) 2021-09-22 17:08:49 -07:00
avd_install.sh fix(android): fix android tests (4) (#8211) 2021-08-16 08:13:02 -07:00
avd_recreate.sh fix(android): fix android tests (4) (#8211) 2021-08-16 08:13:02 -07:00
avd_start.sh fix(android): fix android tests (4) (#8211) 2021-08-16 08:13:02 -07:00
avd_test.js feat(scopes): make page a scope (#4385) 2020-11-10 14:47:26 -08:00
build_android_driver.sh chore(android): respect timeout, add build script (#4690) 2020-12-11 23:35:25 -08:00
check_chromium_cdn.js devops: migrate //utils/check_availability.js off browser fetcher (#3418) 2020-08-12 15:01:07 -07:00
check_deps.js chore: migrate expect(locator).toMatchText to protocol (#9117) 2021-09-23 16:46:46 -07:00
copyright.js chore(eslint): lint for copyrights on files (#2858) 2020-07-07 11:12:45 -07:00
draft_release_notes.sh chore: udpate scripts that generates release draft (#5556) 2021-02-24 13:26:44 -08:00
generate_channels.js fix(inspector): stop on all snapshottable actions (#8990) 2021-09-17 15:24:15 -07:00
generate_dotnet_channels.js chore: dotnet connect + generator 2021-08-16 12:49:25 -07:00
list_closed_issues.sh chore: add script to fetch closed bugs since git commit (#2066) 2020-04-30 17:57:45 -07:00
markdown.js docs: fix markdown parser swallowing lines after code snippets (#8904) 2021-09-13 18:48:16 -07:00
print_versions.js docs: fix browser version generation script (#4797) 2020-12-21 18:09:55 -08:00
publish_all_packages.sh feat(test): introduce npx playwright test (#6816) 2021-06-03 08:07:55 -07:00
roll_browser.js chore: fix utils/roll_browser.js after #9078 2021-09-24 17:09:54 +02:00
upload_flakiness_dashboard.sh devops: better upload flakiness dashboard upload script (#6176) 2021-04-19 08:39:10 -07:00
video_stress.js fix(video): reduce buffering in ffmpeg, avoid overbooking cpu (#8786) 2021-09-09 12:41:06 -07:00