@lvce-editor/test-with-playwright-worker 15.0.0 → 15.1.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 +6 -7
- package/package.json +1 -1
package/dist/workerMain.js
CHANGED
|
@@ -864,8 +864,6 @@ const isEnoentError = error => {
|
|
|
864
864
|
return error && error.code === ENOENT;
|
|
865
865
|
};
|
|
866
866
|
|
|
867
|
-
// @ts-ignore
|
|
868
|
-
|
|
869
867
|
/**
|
|
870
868
|
* @param {Dirent} dirent
|
|
871
869
|
*/
|
|
@@ -1026,7 +1024,7 @@ const runTests = async ({
|
|
|
1026
1024
|
test,
|
|
1027
1025
|
testSrc,
|
|
1028
1026
|
timeout,
|
|
1029
|
-
traceFocus
|
|
1027
|
+
traceFocus: traceFocus ?? false
|
|
1030
1028
|
});
|
|
1031
1029
|
await onResult(result);
|
|
1032
1030
|
// @ts-ignore
|
|
@@ -1179,8 +1177,7 @@ const getPort = () => {
|
|
|
1179
1177
|
return getPorts();
|
|
1180
1178
|
};
|
|
1181
1179
|
|
|
1182
|
-
const getPossibleServerPaths =
|
|
1183
|
-
const cwd = process.cwd();
|
|
1180
|
+
const getPossibleServerPaths = cwd => {
|
|
1184
1181
|
const toTry = ['@lvce-editor/server', pathToFileURL(join(cwd, '..', 'server', 'node_modules', '@lvce-editor', 'server', 'index.js')).toString(), pathToFileURL(join(cwd, '..', 'build', 'node_modules', '@lvce-editor', 'server', 'index.js')).toString(), pathToFileURL(join(cwd, '..', '..', '..', 'packages', 'server', 'node_modules', '@lvce-editor', 'server', 'index.js')).toString()];
|
|
1185
1182
|
return toTry;
|
|
1186
1183
|
};
|
|
@@ -1189,7 +1186,7 @@ const getServerPath = async serverPath => {
|
|
|
1189
1186
|
if (serverPath) {
|
|
1190
1187
|
return serverPath;
|
|
1191
1188
|
}
|
|
1192
|
-
const toTry = getPossibleServerPaths();
|
|
1189
|
+
const toTry = getPossibleServerPaths(process.cwd());
|
|
1193
1190
|
// @ts-ignore
|
|
1194
1191
|
for (const path of toTry) {
|
|
1195
1192
|
try {
|
|
@@ -1354,7 +1351,9 @@ const runAllTests = async (extensionPath, testPath, cwd, headless, timeout, serv
|
|
|
1354
1351
|
await rpc.invoke(HandleFinalResult, finalResult);
|
|
1355
1352
|
};
|
|
1356
1353
|
await runTests({
|
|
1357
|
-
filter
|
|
1354
|
+
...(filter ? {
|
|
1355
|
+
filter
|
|
1356
|
+
} : {}),
|
|
1358
1357
|
headless,
|
|
1359
1358
|
onFinalResult,
|
|
1360
1359
|
onResult,
|