playwright/utils/generate_types
Dmitry Gozman d9f849fb14
feat(test runner): replace declare/define with "options" (#10293)
1. Fixtures defined in test.extend() can now have `{ option: true }` configuration that makes them overridable in the config. Options support all other properties of fixtures - value/function, scope, auto.
```
const test = base.extend<MyOptions>({
  foo: ['default', { option: true }],
});
```

2. test.declare() and project.define are removed.

3. project.use applies overrides to default option values and nothing else. Any test.extend() and test.use() calls take priority over config options.

Required user changes: if someone used to define fixture options with test.extend(), overriding them in config will stop working. The solution is to add `{ option: true }`.

```
// Old code
export const test = base.extend<{ myOption: number, myFixture: number }>({
  myOption: 123,
  myFixture: ({ myOption }, use) => use(2 * myOption),
});

// New code
export const test = base.extend<{ myOption: number, myFixture: number }>({
  myOption: [123, { option: true }],
  myFixture: ({ myOption }, use) => use(2 * myOption),
});
```
2021-11-18 15:45:52 -08:00
..
test chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
exported.json chore: migrate connect/overCDP to options instead of params (#7606) 2021-07-22 16:55:23 +02:00
index.js fix(monorepo): explicitly list package.json exports instead of using glob patterns (#9584) 2021-10-19 12:28:02 -04:00
overrides-test.d.ts feat(test runner): replace declare/define with "options" (#10293) 2021-11-18 15:45:52 -08:00
overrides-testReporter.d.ts feat(reporters): augment non-stdio reporters with dot/line (#10003) 2021-11-03 08:25:16 -07:00
overrides.d.ts fix(fetch): use data, form and multipart for different post data (#9248) 2021-10-01 12:11:33 -07:00
parseOverrides.js feat(types): generate JSDoc for things like test.describe.only (#8663) 2021-09-02 13:56:36 -07:00