Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: fix string eval snippet

Pavel Feldmane065a927bb54
diff --git a/docs/src/test-typescript-js.md b/docs/src/test-typescript-js.md
index e61008f591..0cb5cc8b63 100644
--- a/docs/src/test-typescript-js.md
+++ b/docs/src/test-typescript-js.md
@@ -95,8 +95,8 @@ Using dynamic imports inside a function passed to various `evaluate()` methods i
To work around this issue, use a string template instead of a function:
```js
-await page.evaluate(`async () => {
+await page.evaluate(`(async () => {
const { value } = await import('some-module');
console.log(value);
-}`);
+})()`);
```