MCPcopy
hub / github.com/angular/angular / run

Function run

vscode-ng-language-service/integration/e2e/jasmine.ts:4–24  ·  view source on GitHub ↗
(
  _testsRoot: string,
  cb: (error: any, exitCode?: number) => void,
)

Source from the content-addressed store, hash-verified

2import {TerminalReporter} from 'jasmine-reporters';
3
4export async function run(
5 _testsRoot: string,
6 cb: (error: any, exitCode?: number) => void,
7): Promise<void> {
8 const jasmine = new Jasmine({projectBaseDir: __dirname});
9 jasmine.loadConfig({
10 spec_files: ['*_spec.js'],
11 });
12
13 jasmine.addReporter(new TerminalReporter());
14 jasmine.exitOnCompletion = false;
15 const result = await jasmine.execute();
16
17 if (result.overallStatus === 'passed') {
18 console.log('All specs have passed');
19 cb(null, 0);
20 } else {
21 console.log('At least one spec has failed');
22 cb(result.incompleteReason, 1);
23 }
24}

Callers

nothing calls this directly

Calls 3

executeMethod · 0.65
logMethod · 0.65
cbFunction · 0.50

Tested by

no test coverage detected