@lvce-editor/test-with-playwright-worker 13.0.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/workerMain.js +8 -3
- package/package.json +2 -2
package/dist/workerMain.js
CHANGED
|
@@ -987,9 +987,10 @@ const runTest = async ({
|
|
|
987
987
|
|
|
988
988
|
/**
|
|
989
989
|
*
|
|
990
|
-
* @param {{testSrc:string, tests:string[], headless:boolean, page: import('@playwright/test').Page, port:number, timeout:number, onResult:any, onFinalResult:any}} param0
|
|
990
|
+
* @param {{testSrc:string, tests:string[], filter?: string, headless:boolean, page: import('@playwright/test').Page, port:number, timeout:number, onResult:any, onFinalResult:any}} param0
|
|
991
991
|
*/
|
|
992
992
|
const runTests = async ({
|
|
993
|
+
filter,
|
|
993
994
|
headless,
|
|
994
995
|
onFinalResult,
|
|
995
996
|
onResult,
|
|
@@ -1004,7 +1005,9 @@ const runTests = async ({
|
|
|
1004
1005
|
let skipped = 0;
|
|
1005
1006
|
let passed = 0;
|
|
1006
1007
|
const start = performance.now();
|
|
1007
|
-
|
|
1008
|
+
// Filter tests if a filter is provided
|
|
1009
|
+
const filteredTests = filter ? tests.filter(test => test.includes(filter)) : tests;
|
|
1010
|
+
for (const test of filteredTests) {
|
|
1008
1011
|
const result = await runTest({
|
|
1009
1012
|
page,
|
|
1010
1013
|
port,
|
|
@@ -1291,8 +1294,9 @@ const tearDownTests = async ({
|
|
|
1291
1294
|
* @param {number} timeout
|
|
1292
1295
|
* @param {string} serverPath
|
|
1293
1296
|
* @param {boolean} traceFocus
|
|
1297
|
+
* @param {string} filter
|
|
1294
1298
|
*/
|
|
1295
|
-
const runAllTests = async (extensionPath, testPath, cwd, headless, timeout, serverPath, traceFocus) => {
|
|
1299
|
+
const runAllTests = async (extensionPath, testPath, cwd, headless, timeout, serverPath, traceFocus, filter) => {
|
|
1296
1300
|
string(extensionPath);
|
|
1297
1301
|
string(testPath);
|
|
1298
1302
|
string(cwd);
|
|
@@ -1324,6 +1328,7 @@ const runAllTests = async (extensionPath, testPath, cwd, headless, timeout, serv
|
|
|
1324
1328
|
await rpc.invoke(HandleFinalResult, finalResult);
|
|
1325
1329
|
};
|
|
1326
1330
|
await runTests({
|
|
1331
|
+
filter,
|
|
1327
1332
|
headless,
|
|
1328
1333
|
onFinalResult,
|
|
1329
1334
|
onResult,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/test-with-playwright-worker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "Worker package for test-with-playwright",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
"@playwright/test": "1.58.0"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
18
|
+
"node": ">=24"
|
|
19
19
|
}
|
|
20
20
|
}
|