Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions as-test.config.warpo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import config from "./as-test.config.js";

/**
* @type {import("./config.d.ts").Config}
*/
export default { ...config, warpo: true };
7 changes: 7 additions & 0 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ const isolatedInConfig = getBoolean(options.isolated, config.isolated);
const isolated = isolatedInConfig ?? false;

const entryFiles = config.entryFiles ?? null;
const warpo = config.warpo ?? false;
if (warpo) {
console.log(chalk.gray("using warpo"));
} else {
console.log(chalk.gray("using asc"));
}

/**
* @type {import("../dist/interface.d.ts").TestOption}
Expand All @@ -104,6 +110,7 @@ const testOption = {
errorLimit: Number(options.coverageLimit?.at(0)),

isolated,
warpo,
};

start_unit_test(testOption)
Expand Down
3 changes: 3 additions & 0 deletions config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ export declare class Config {

/** output report mode, default is "table" */
mode?: OutputMode | OutputMode[];

/** whether to build with warpo */
warpo?: boolean;
}
1 change: 1 addition & 0 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Finally, run `npm run test` and as-test will print this message:

(node:144985) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
using asc
code analysis: OK
compile test files: OK
instrument: OK
Expand Down
Loading