Skip to content

Instantly share code, notes, and snippets.

@another-guy
Created March 4, 2019 08:47
Show Gist options
  • Select an option

  • Save another-guy/bb73e285f404503046d4e9d88f62dc4b to your computer and use it in GitHub Desktop.

Select an option

Save another-guy/bb73e285f404503046d4e9d88f62dc4b to your computer and use it in GitHub Desktop.
Jest test runner (pseudocode)
const jestTestRunnerForVSCodeE2E: ITestRunner = {
run(testsRoot: string, clb: (error: Error, failures?: number) => void): void {
try {
const result = runJestTests(configuration);
if (result.executionError) {
clb(result.executionError);
} else {
clb(undefined, result.numberOfFailedTests);
}
} catch (e) {
clb(e);
}
}
};
module.exports = jestTestRunnerForVSCodeE2E;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment