diff --git a/package.json b/package.json index eedc34a0..60302cf9 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,8 @@ } }, "scripts": { - "test": "jest", + "test": "playwright test", + "test:debug": "DEBUG=pw:browser* playwright test", "start": "electron .", "start:debug": "ELECTRON_ENABLE_LOGGING=1 electron .", "icon": "rimraf assets/generated && electron-icon-maker --input=assets/youtube-music.png --output=assets/generated", @@ -120,6 +121,7 @@ "ytpl": "^2.3.0" }, "devDependencies": { + "@playwright/test": "^1.25.1", "auto-changelog": "^2.4.0", "electron": "^18.3.9", "electron-builder": "^23.0.3", diff --git a/plugins/sponsorblock/tests/segments.test.js b/plugins/sponsorblock/tests/segments.test.js index dbc3d4b0..39859608 100644 --- a/plugins/sponsorblock/tests/segments.test.js +++ b/plugins/sponsorblock/tests/segments.test.js @@ -1,3 +1,5 @@ +const { test, expect } = require("@playwright/test"); + const { sortSegments } = require("../segments"); test("Segment sorting", () => { diff --git a/yarn.lock b/yarn.lock index a358420a..2ac5ffea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1306,6 +1306,14 @@ resolved "https://registry.yarnpkg.com/@nornagon/put/-/put-0.0.8.tgz#9d497ec46c9364acc3f8b59aa3cf8ee4134ae337" integrity sha512-ugvXJjwF5ldtUpa7D95kruNJ41yFQDEKyF5CW4TgKJnh+W/zmlBzXXeKTyqIgwMFrkePN2JqOBqcF0M0oOunow== +"@playwright/test@^1.25.1": + version "1.25.1" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.25.1.tgz#9847234b6f2b0cca71962b338da7db366a1e9720" + integrity sha512-IJ4X0yOakXtwkhbnNzKkaIgXe6df7u3H3FnuhI9Jqh+CdO0e/lYQlDLYiyI9cnXK8E7UAppAWP+VqAv6VX7HQg== + dependencies: + "@types/node" "*" + playwright-core "1.25.1" + "@remusao/guess-url-type@^1.1.2": version "1.2.1" resolved "https://registry.yarnpkg.com/@remusao/guess-url-type/-/guess-url-type-1.2.1.tgz#b3e7c32abdf98d0fb4f93cc67cad580b5fe4ba57"