intellitester 0.2.34 → 0.2.35
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/cli/index.cjs +67 -0
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +67 -0
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -1873,6 +1873,73 @@ var main = async () => {
|
|
|
1873
1873
|
console.error(`
|
|
1874
1874
|
\u274C Test failed: ${path4__namespace.default.basename(test)}`);
|
|
1875
1875
|
console.error(` ${error instanceof Error ? error.message : String(error)}
|
|
1876
|
+
`);
|
|
1877
|
+
failed = true;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
if (failed) {
|
|
1881
|
+
process2__default.default.exitCode = 1;
|
|
1882
|
+
}
|
|
1883
|
+
return;
|
|
1884
|
+
}
|
|
1885
|
+
const resolvedFile = path4__namespace.default.resolve(file);
|
|
1886
|
+
const fileStat = await fs3__default.default.stat(resolvedFile);
|
|
1887
|
+
if (fileStat.isDirectory()) {
|
|
1888
|
+
const discovered = await discoverTestFiles(resolvedFile);
|
|
1889
|
+
const total = discovered.pipelines.length + discovered.workflows.length + discovered.tests.length;
|
|
1890
|
+
if (total === 0) {
|
|
1891
|
+
logError(`No test files found in ${file}. Create .pipeline.yaml, .workflow.yaml, or .test.yaml files.`);
|
|
1892
|
+
process2__default.default.exit(1);
|
|
1893
|
+
}
|
|
1894
|
+
console.log(`Discovered ${total} test file(s) in ${file}:`);
|
|
1895
|
+
if (discovered.pipelines.length > 0) {
|
|
1896
|
+
console.log(` Pipelines: ${discovered.pipelines.length}`);
|
|
1897
|
+
}
|
|
1898
|
+
if (discovered.workflows.length > 0) {
|
|
1899
|
+
console.log(` Workflows: ${discovered.workflows.length}`);
|
|
1900
|
+
}
|
|
1901
|
+
if (discovered.tests.length > 0) {
|
|
1902
|
+
console.log(` Tests: ${discovered.tests.length}`);
|
|
1903
|
+
}
|
|
1904
|
+
console.log("");
|
|
1905
|
+
let failed = false;
|
|
1906
|
+
for (const pipeline of discovered.pipelines) {
|
|
1907
|
+
try {
|
|
1908
|
+
await runPipelineCommand(pipeline, runOpts);
|
|
1909
|
+
} catch (error) {
|
|
1910
|
+
console.error(`
|
|
1911
|
+
\u274C Pipeline failed: ${path4__namespace.default.basename(pipeline)}`);
|
|
1912
|
+
console.error(` ${error instanceof Error ? error.message : String(error)}
|
|
1913
|
+
`);
|
|
1914
|
+
failed = true;
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
for (const workflow of discovered.workflows) {
|
|
1918
|
+
try {
|
|
1919
|
+
await runWorkflowCommand(workflow, runOpts);
|
|
1920
|
+
} catch (error) {
|
|
1921
|
+
console.error(`
|
|
1922
|
+
\u274C Workflow failed: ${path4__namespace.default.basename(workflow)}`);
|
|
1923
|
+
console.error(` ${error instanceof Error ? error.message : String(error)}
|
|
1924
|
+
`);
|
|
1925
|
+
failed = true;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
for (const test of discovered.tests) {
|
|
1929
|
+
try {
|
|
1930
|
+
await runTestCommand(test, {
|
|
1931
|
+
headed: options.visible,
|
|
1932
|
+
browser,
|
|
1933
|
+
noServer: !options.server,
|
|
1934
|
+
interactive: options.interactive,
|
|
1935
|
+
debug: options.debug,
|
|
1936
|
+
sessionId: options.sessionId,
|
|
1937
|
+
trackDir: options.trackDir
|
|
1938
|
+
});
|
|
1939
|
+
} catch (error) {
|
|
1940
|
+
console.error(`
|
|
1941
|
+
\u274C Test failed: ${path4__namespace.default.basename(test)}`);
|
|
1942
|
+
console.error(` ${error instanceof Error ? error.message : String(error)}
|
|
1876
1943
|
`);
|
|
1877
1944
|
failed = true;
|
|
1878
1945
|
}
|