58 lines
1.8 KiB
Markdown
58 lines
1.8 KiB
Markdown
#### Add additional Playwright test functions (#17876 by @BPScott)
|
|
|
|
Prettier already avoids changing indentation for test functions when you add `.skip` to
|
|
them. It now also treats the Playwright functions [`test.fixme`](https://playwright.dev/docs/api/class-test#test-fixme), [`test.describe.skip`](https://playwright.dev/docs/api/class-test#test-describe-skip) and [`test.describe.fixme`](https://playwright.dev/docs/api/class-test#test-describe-fixme) similar to `test.skip`.
|
|
|
|
<!-- prettier-ignore -->
|
|
```js
|
|
// Input
|
|
test.fixme("does something really long and complicated so I have to write a very long name for the test", () => {
|
|
// code
|
|
});
|
|
|
|
test.describe.skip("does something really long and complicated so I have to write a very long name for the test", () => {
|
|
// code
|
|
});
|
|
|
|
test.describe.fixme("does something really long and complicated so I have to write a very long name for the test", () => {
|
|
// code
|
|
});
|
|
|
|
// Prettier stable
|
|
test.fixme(
|
|
"does something really long and complicated so I have to write a very long name for the test",
|
|
() => {
|
|
// code
|
|
},
|
|
);
|
|
|
|
test.describe.skip(
|
|
"does something really long and complicated so I have to write a very long name for the test",
|
|
() => {
|
|
// code
|
|
},
|
|
);
|
|
|
|
test.describe.fixme(
|
|
"does something really long and complicated so I have to write a very long name for the test",
|
|
() => {
|
|
// code
|
|
},
|
|
);
|
|
|
|
// Prettier main
|
|
test.fixme("does something really long and complicated so I have to write a very long name for the test", () => {
|
|
// code
|
|
});
|
|
|
|
test.describe
|
|
.skip("does something really long and complicated so I have to write a very long name for the test", () => {
|
|
// code
|
|
});
|
|
|
|
test.describe
|
|
.fixme("does something really long and complicated so I have to write a very long name for the test", () => {
|
|
// code
|
|
});
|
|
```
|