playwright/tests/playwright-test
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
..
assets feat(test-runner): add webServer (#7368) 2021-07-07 20:19:42 +02:00
entry fix(test): make use in config accept option values only (#8828) 2021-09-13 17:50:31 -07:00
stable-test-runner test: use ToT test runner for non-test-runner tests (#8671) 2021-09-03 11:22:25 -07:00
access-data.spec.ts feat(test-runner): introduce attachments (#7685) 2021-07-16 13:48:37 -07:00
attachment-reporter.spec.ts feat(report): render attachment as a part of failure (#8903) 2021-09-13 18:07:40 -07:00
base-reporter.spec.ts fix(test runner): account for errors with inconsistent stack/message (#8950) 2021-09-15 21:28:36 -07:00
basic.spec.ts fix(test runner): report unhandled rejections during worker teardown (#8592) 2021-08-31 10:50:30 -07:00
config.spec.ts feat(runner): support multiple names in project filter (#8600) 2021-09-02 09:29:55 -07:00
dot-reporter.spec.ts feat(test runner): show failure details for flaky test runs (#8332) 2021-08-19 18:20:53 -07:00
exit-code.spec.ts fix(test runner): do not special case test.fail (#8447) 2021-08-25 12:19:50 -07:00
expect.spec.ts fix(test-runner): set expand: false for expect. (#7722) 2021-07-19 11:59:53 -05:00
fixture-errors.spec.ts feat(test runner): support test fixtures in beforeAll/afterAll (#8082) 2021-08-09 13:26:33 -07:00
fixtures.spec.ts feat(test runner): support test fixtures in beforeAll/afterAll (#8082) 2021-08-09 13:26:33 -07:00
gitignore.spec.ts chore: remove internal uses of "folio" (#6931) 2021-06-06 22:07:07 -07:00
global-setup.spec.ts fix(test): make use in config accept option values only (#8828) 2021-09-13 17:50:31 -07:00
golden.spec.ts fix(test-runner): do not attach non-existent diff (#8297) 2021-08-20 13:40:27 -07:00
hooks.spec.ts fix(test runner): report beforeAll timeout instead of hanging (#8529) 2021-08-28 07:19:45 -07:00
html-reporter.spec.ts feat(html): restore trace, video, screenshot (#8925) 2021-09-14 16:26:31 -07:00
json-reporter.spec.ts feat: addition of tags to JSON reporter output (#8920) 2021-09-15 12:30:22 -07:00
junit-reporter.spec.ts fix(junit): produce a single system-out entry (#9091) 2021-09-22 15:28:57 -07:00
line-reporter.spec.ts feat(test runner): show failure details for flaky test runs (#8332) 2021-08-19 18:20:53 -07:00
list-mode.spec.ts fix(test-runner): do not list tests to stdout when JSON reporter is used (#7730) 2021-07-20 01:10:43 +02:00
list-reporter.spec.ts fix(runner): avoid line wrapping in list reporter (#8705) 2021-09-07 17:42:17 -07:00
loader.spec.ts feat(test-runner): support esm modules in more places (#7542) 2021-07-12 11:59:58 -05:00
match-grep.spec.ts test(test-runner): add tests to show that grep is case insensitive (#8091) 2021-08-09 14:05:51 -04:00
max-failures.spec.ts fix(test runner): make obtainWorker() resolve with null when stopping (#8018) 2021-08-05 15:00:00 -07:00
override-timeout.spec.ts test(test-runner): unflake override-timeout.spec.ts (#7869) 2021-07-29 13:34:46 -07:00
playwright-test-fixtures.ts test: introduce some common test fixtures (#9060) 2021-09-21 16:24:48 -07:00
playwright-test.config.ts test: use ToT test runner for non-test-runner tests (#8671) 2021-09-03 11:22:25 -07:00
playwright.artifacts.spec.ts chore: remove stale html experiments (#8905) 2021-09-13 20:34:46 -07:00
playwright.expect.misc.spec.ts chore: add a test for the log scale polling (#9136) 2021-09-24 12:54:33 -07:00
playwright.expect.text.spec.ts fix(expect): produce "waiting for selector" log, corner cases (#9140) 2021-09-24 18:55:45 -07:00
playwright.expect.true.spec.ts chore: migrate expect(locator).toMatchText to protocol (#9117) 2021-09-23 16:46:46 -07:00
playwright.spec.ts fix(inspector): stop on all snapshottable actions (#8990) 2021-09-17 15:24:15 -07:00
raw-reporter.spec.ts test: improve child process utilities in tests (#9036) 2021-09-20 17:17:12 -07:00
repeat-each.spec.ts chore: remove internal uses of "folio" (#6931) 2021-06-06 22:07:07 -07:00
reporter.spec.ts chore: migrate expect(locator).toMatchText to protocol (#9117) 2021-09-23 16:46:46 -07:00
retry.spec.ts fix(test runner): do not special case test.fail (#8447) 2021-08-25 12:19:50 -07:00
runner.spec.ts feat(test runner): file scope fixtures (#7969) 2021-08-04 21:11:02 -07:00
shard.spec.ts fix(test runner): disallow use(workerFixture) in describes (#8119) 2021-08-10 16:32:32 -07:00
stdio.spec.ts feat(test runner): show failure details for flaky test runs (#8332) 2021-08-19 18:20:53 -07:00
test-extend.spec.ts feat(test-runner): do only allow unique spec titles per suite (#7300) 2021-06-28 22:13:35 +02:00
test-ignore.spec.ts test: improve child process utilities in tests (#9036) 2021-09-20 17:17:12 -07:00
test-info.spec.ts chore: remove internal uses of "folio" (#6931) 2021-06-06 22:07:07 -07:00
test-modifiers.spec.ts fix(test runner): add an overload for test.skip(title, fn) (#8454) 2021-08-25 14:36:36 -07:00
test-output-dir.spec.ts test: improve child process utilities in tests (#9036) 2021-09-20 17:17:12 -07:00
test-parallel.spec.ts feat(test runner): describe.parallel (#8662) 2021-09-02 15:42:07 -07:00
test-serial.spec.ts feat(test runner): describe.parallel (#8662) 2021-09-02 15:42:07 -07:00
test-step.spec.ts fix(test runner): after hooks step should not be nested (#8969) 2021-09-16 15:51:27 -07:00
test-use.spec.ts fix(test runner): disallow use(workerFixture) in describes (#8119) 2021-08-10 16:32:32 -07:00
timeout.spec.ts feat(test runner): support test.setTimeout for the whole block (#7387) 2021-06-29 13:33:13 -07:00
types-2.spec.ts feat(test runner): support test fixtures in beforeAll/afterAll (#8082) 2021-08-09 13:26:33 -07:00
types.spec.ts feat(test runner): improve fixture typings for function fixtures (#9138) 2021-09-24 19:59:30 -07:00
web-server.spec.ts fix(test-runner): WebServer: use socket for reuseExistingServer to detect servers that aren't using SO_REUSEADDR (#8537) 2021-09-02 18:39:41 +02:00
worker-index.spec.ts fix(test runner): do not special case test.fail (#8447) 2021-08-25 12:19:50 -07:00