forked from anti-work/shortest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: put test executor in an isolated module for better execution
- Loading branch information
Showing
2 changed files
with
37 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Reporter } from './reporter'; | ||
import { TestCompiler } from './compiler'; | ||
|
||
export class TestExecutor { | ||
private reporter: Reporter; | ||
private compiler: TestCompiler; | ||
|
||
constructor() { | ||
this.reporter = new Reporter(); | ||
this.compiler = new TestCompiler(); | ||
} | ||
|
||
async executeTest(file: string) { | ||
this.reporter.startFile(file); | ||
this.reporter.reportTest('Sample test'); | ||
} | ||
|
||
getReporter(): Reporter { | ||
return this.reporter; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters