Skip to content

Commit a92b450

Browse files
committed
Fix tests with modules
1 parent d56910f commit a92b450

File tree

6 files changed

+4
-4
lines changed

6 files changed

+4
-4
lines changed
File renamed without changes.

tests/basic.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { testInBrowser } = require("./resources/pw-utils");
1+
import { testInBrowser } from "./resources/pw-utils.js";
22

33
testInBrowser("observe", "View transitions are observable");
44
testInBrowser("classify", ".classify adds classes for the duration of the view transition");

tests/nav.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { testInBrowser } = require("./resources/pw-utils");
1+
import { testInBrowser } from "./resources/pw-utils.js";
22

33
testInBrowser("nav-spa", "Test SPA navs", {page: "home"});
44
testInBrowser("list-details", "Test detail params", {page: "home"});

tests/resources/pw-utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { test, expect } = require('@playwright/test');
1+
import { test, expect } from '@playwright/test';
22
export function testInBrowser(name, label, params = {}) {
33
const url = new URL(`http://localhost:3000/tests/resources/${name}.html`);
44
for (const param in params)

tests/sanity.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { test, expect } = require('@playwright/test');
1+
import {test, expect} from '@playwright/test';
22

33
test("The local server infra works", async ({page}) => {
44
await page.goto("http://localhost:3000/tests/resources/sanity.html");

tests/sort.spec.js

Whitespace-only changes.

0 commit comments

Comments
 (0)