1
1
import * as vscode from 'vscode'
2
2
import node from '../services/node'
3
3
4
+ // TODO: use tap parser to make it easier to support other test runners
5
+
4
6
// ensure only latest run_test action is taken
5
7
let currentId = 0
6
8
@@ -35,12 +37,6 @@ async function runTest({onSuccess, onFail, onRun, onError}: Props): Promise<void
35
37
36
38
const outputChannelName = 'Test Output'
37
39
38
- // TODO: validate test directory from package.json exists
39
- // let testFile = path.join('test');
40
- // if (!await exists(testFile)) {
41
- // return emptyTasks;
42
- // }
43
-
44
40
// TODO: verify test runner for args
45
41
// jest CLI docs https://jestjs.io/docs/en/cli
46
42
const testArgs = [
@@ -51,12 +47,6 @@ async function runTest({onSuccess, onFail, onRun, onError}: Props): Promise<void
51
47
'--maxWorkers=4'
52
48
]
53
49
54
- // if .git repo, use --onlyChanged
55
- // const hasGit = path.join('.git');
56
- // if (await exists(hasGit)) {
57
- // testArgs.push('--onlyChanged')
58
- // }
59
-
60
50
const commandLine = `npm test --${ testArgs . join ( ' ' ) } `
61
51
62
52
try {