playwright/tests
Max Schmitt c8c37009c3
test(esm): fix import attribute tests (#30798)
Pre Node.js `18.20.0`:

- `assert` is supported

Post Node.js `18.20.0`

- `assert` and `with` is supported.

Before https://github.com/microsoft/playwright/pull/30482 we kept
`asserts` in the JS code, Node.js was interpreting them. The `with`
keyword was not supported, this was what the PR was fixing.

After https://github.com/microsoft/playwright/pull/30482 Babel is
converting `assert` (deprecated) into `with` (successor) since we use
the `deprecatedAssertSyntax` option.

This means, that the minimum Node.js version we support in order to use
import attributes is now `18.20.0` where they added the `with` support.
This follows our principle of supporting only the latest minor release
for Node.js versions.

See here for the 18.20 changelog:

> #### Added support for import attributes
>
> Support has been added for import attributes, to replace the old
import
> assertions syntax. This will aid migration by making the new syntax
available
> across all currently supported Node.js release lines.
>
> This adds the `with` keyword which should be used in place of the
previous
> `assert` keyword, which will be removed in a future semver-major
Node.js
> release.
>
> For example,
>
> ```console
> import "foo" assert { ... }
> ```
>
> should be replaced with
>
> ```console
> import "foo" with { ... }
> ```

Fixes https://github.com/microsoft/playwright/pull/30482 - the tests
were a noop before, since they were tree-shaked by Babel.
2024-05-14 17:59:41 +01:00
..
android chore: do not use project id in telereporter (#29776) 2024-03-01 21:44:08 -08:00
assets fix(trace-viewer): make call ids unique across trace files (#30720) 2024-05-08 17:33:31 -07:00
components chore: fix typos (#30645) 2024-05-08 19:40:03 +01:00
config chore: fix typos (#30645) 2024-05-08 19:40:03 +01:00
electron fix(electron): record har file (#30748) 2024-05-10 15:32:01 -07:00
image_tools chore: bump @babel dependencies (#27632) 2023-10-17 20:52:41 +02:00
installation chore: fix typos (#30645) 2024-05-08 19:40:03 +01:00
library fix(selector generator): properly escape re used in has-text (#30767) 2024-05-13 12:40:46 -07:00
page Revert "fix(highlight): highlight Top Layer elements (#30001)" (#30800) 2024-05-14 17:23:52 +01:00
playwright-test test(esm): fix import attribute tests (#30798) 2024-05-14 17:59:41 +01:00
stress chore: drop firefox-asan (#30626) 2024-05-01 22:13:00 +00:00
third_party/proxy chore: fix typos (#30645) 2024-05-08 19:40:03 +01:00
webview2 chore: remove checkCoverage script (#30552) 2024-04-25 14:00:14 -07:00
.eslintrc.js chore: strengthen linting (#29669) 2024-02-26 16:52:28 -08:00
index.d.ts test: added tests for WebSocket over Socks proxy (#7235) 2021-06-24 18:50:16 +02:00
tsconfig.json test: add installation tests for supposed plugin story (#27331) 2023-09-28 17:18:22 -07:00