@midscene/test 1.15.0 → 1.15.1
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/es/cli/index.mjs +8 -5
- package/dist/es/cli/index.mjs.map +1 -1
- package/dist/es/test-cli.mjs +9 -6
- package/dist/es/test-cli.mjs.map +1 -1
- package/dist/lib/cli/index.js +8 -5
- package/dist/lib/cli/index.js.map +1 -1
- package/dist/lib/test-cli.js +9 -6
- package/dist/lib/test-cli.js.map +1 -1
- package/package.json +13 -13
package/dist/lib/cli/index.js
CHANGED
|
@@ -37,7 +37,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
37
37
|
const external_node_path_namespaceObject = require("node:path");
|
|
38
38
|
const external_node_url_namespaceObject = require("node:url");
|
|
39
39
|
const api_namespaceObject = require("tsx/cjs/api");
|
|
40
|
-
const esm_api_namespaceObject = require("tsx/esm/api");
|
|
41
40
|
const test_runner_namespaceObject = require("@midscene/core/internal/test-runner");
|
|
42
41
|
const NodeRegistry = test_runner_namespaceObject.NodeRegistry;
|
|
43
42
|
const projectIdFromIndex = (index)=>`project-${index}`;
|
|
@@ -296,10 +295,14 @@ async function loadTestProject(configPath) {
|
|
|
296
295
|
const extension = assertSupportedConfig(absolutePath);
|
|
297
296
|
let loaded;
|
|
298
297
|
try {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
298
|
+
if ('.mjs' === extension) loaded = await import((0, external_node_url_namespaceObject.pathToFileURL)(absolutePath).href);
|
|
299
|
+
else {
|
|
300
|
+
const { tsImport } = await import("tsx/esm/api");
|
|
301
|
+
loaded = await tsImport((0, external_node_url_namespaceObject.pathToFileURL)(absolutePath).href, {
|
|
302
|
+
parentURL: (0, external_node_url_namespaceObject.pathToFileURL)(`${(0, external_node_path_namespaceObject.dirname)(absolutePath)}${external_node_path_namespaceObject.sep}`).href,
|
|
303
|
+
tsconfig: false
|
|
304
|
+
});
|
|
305
|
+
}
|
|
303
306
|
} catch (error) {
|
|
304
307
|
try {
|
|
305
308
|
if ('.mjs' === extension || !canRetryWithCjsLoader(error)) throw error;
|