Skip to content

Commit

Permalink
fix: add time statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
i5ting committed Oct 10, 2022
1 parent 9004e68 commit 8a097a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,20 @@ export function runCli(rest: any) {

// compile and watch, then run test
WatchFiles(files, context);

// time statistics
console.timeEnd();
}

/**
* for api invoke (use ts-node)
*
*
* run([path.resolve(process.cwd(), "./tests/")])
* run([path.resolve(process.cwd(), "./tests/"),path.resolve(process.cwd(), "./tests/test.ts")])
*/
export function run(rest: any) {
debug("run With UvuStrategy");
console.time("run ts");

// set context use default strategy
const context = new Context(new UvuStrategy());
Expand All @@ -55,4 +59,7 @@ export function run(rest: any) {

// run tests
context.runTsTestFiles(files);

// time statistics
console.timeEnd();
}

0 comments on commit 8a097a2

Please sign in to comment.