Skip to content

Commit

Permalink
Fix tests with modules
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr committed Jan 3, 2024
1 parent d56910f commit a92b450
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 4 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/basic.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { testInBrowser } = require("./resources/pw-utils");
import { testInBrowser } from "./resources/pw-utils.js";

testInBrowser("observe", "View transitions are observable");
testInBrowser("classify", ".classify adds classes for the duration of the view transition");
Expand Down
2 changes: 1 addition & 1 deletion tests/nav.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { testInBrowser } = require("./resources/pw-utils");
import { testInBrowser } from "./resources/pw-utils.js";

testInBrowser("nav-spa", "Test SPA navs", {page: "home"});
testInBrowser("list-details", "Test detail params", {page: "home"});
2 changes: 1 addition & 1 deletion tests/resources/pw-utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { test, expect } = require('@playwright/test');
import { test, expect } from '@playwright/test';
export function testInBrowser(name, label, params = {}) {
const url = new URL(`http://localhost:3000/tests/resources/${name}.html`);
for (const param in params)
Expand Down
2 changes: 1 addition & 1 deletion tests/sanity.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { test, expect } = require('@playwright/test');
import {test, expect} from '@playwright/test';

test("The local server infra works", async ({page}) => {
await page.goto("http://localhost:3000/tests/resources/sanity.html");
Expand Down
Empty file removed tests/sort.spec.js
Empty file.

0 comments on commit a92b450

Please sign in to comment.