mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
| datasource | package | from | to | | ---------- | -------------- | ------ | ----- | | npm | jasmine | 3.10.0 | 4.2.1 | | npm | @types/jasmine | 3.5.14 | 4.0.3 | | npm | jasmine | 3.6.1 | 4.2.1 | PR Close #46617
22 lines
822 B
TypeScript
22 lines
822 B
TypeScript
// We can't use `import...from` here, because of the following mess:
|
|
// - GitHub project `jasmine/jasmine` is `jasmine-core` on npm and its typings `@types/jasmine`.
|
|
// - GitHub project `jasmine/jasmine-npm` is `jasmine` on npm and has no typings.
|
|
//
|
|
// Using `import...from 'jasmine'` here, would import from `@types/jasmine` (which refers to the
|
|
// `jasmine-core` module and the `jasmine` module).
|
|
import Jasmine = require('jasmine');
|
|
import 'source-map-support/register';
|
|
|
|
export const runTests = (specFiles: string[]) => {
|
|
const config = {
|
|
random: true,
|
|
spec_files: specFiles,
|
|
stopSpecOnExpectationFailure: true,
|
|
};
|
|
|
|
process.on('unhandledRejection', (reason: any) => console.log('Unhandled rejection:', reason));
|
|
|
|
const runner = new Jasmine({});
|
|
runner.loadConfig(config);
|
|
runner.execute();
|
|
};
|