@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/es/cli/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
3
|
import { require as api_require } from "tsx/cjs/api";
|
|
4
|
-
import { tsImport } from "tsx/esm/api";
|
|
5
4
|
import { NodeRegistry, WorkflowError, WorkflowExecutionFailure, WorkflowParseError, WorkflowPublicationError, asExecutionError, buildTestRunReportDump, classifyWorkflowDocumentFormat, collectTestRunReportSources, createProjectRuntime, isFatalDeviceError, normalizeSteps, runConcurrentJobs, runDocumentAttempts, runWorkflowDocument } from "@midscene/core/internal/test-runner";
|
|
6
5
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
7
6
|
import { globSync } from "tinyglobby";
|
|
@@ -268,10 +267,14 @@ async function loadTestProject(configPath) {
|
|
|
268
267
|
const extension = assertSupportedConfig(absolutePath);
|
|
269
268
|
let loaded;
|
|
270
269
|
try {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
if ('.mjs' === extension) loaded = await import(pathToFileURL(absolutePath).href);
|
|
271
|
+
else {
|
|
272
|
+
const { tsImport } = await import("tsx/esm/api");
|
|
273
|
+
loaded = await tsImport(pathToFileURL(absolutePath).href, {
|
|
274
|
+
parentURL: pathToFileURL(`${dirname(absolutePath)}${sep}`).href,
|
|
275
|
+
tsconfig: false
|
|
276
|
+
});
|
|
277
|
+
}
|
|
275
278
|
} catch (error) {
|
|
276
279
|
try {
|
|
277
280
|
if ('.mjs' === extension || !canRetryWithCjsLoader(error)) throw error;
|