mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: update dependency jasmine to v4 (#46617)
| 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
This commit is contained in:
committed by
Jessica Janiuk
parent
b9f5829509
commit
4190e9a776
@@ -18,6 +18,5 @@ export const runTests = (specFiles: string[]) => {
|
||||
|
||||
const runner = new Jasmine({});
|
||||
runner.loadConfig(config);
|
||||
runner.onComplete((passed: boolean) => process.exit(passed ? 0 : 1));
|
||||
runner.execute();
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"body-parser": "^1.19.0",
|
||||
"delete-empty": "^3.0.0",
|
||||
"express": "^4.17.1",
|
||||
"jasmine": "^3.6.1",
|
||||
"jasmine": "^4.0.0",
|
||||
"nock": "^13.0.4",
|
||||
"node-fetch": "^2.6.1",
|
||||
"shelljs": "^0.8.5",
|
||||
@@ -38,7 +38,7 @@
|
||||
"devDependencies": {
|
||||
"@types/body-parser": "^1.19.0",
|
||||
"@types/express": "^4.17.8",
|
||||
"@types/jasmine": "^3.5.14",
|
||||
"@types/jasmine": "^4.0.0",
|
||||
"@types/nock": "^11.1.0",
|
||||
"@types/node": "^14.6.4",
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ import {PreviewServerError} from '../../lib/preview-server/preview-error';
|
||||
|
||||
|
||||
// Matchers
|
||||
const toBeRejectedWithPreviewServerError: jasmine.CustomAsyncMatcherFactory = () => {
|
||||
const toBeRejectedWithPreviewServerError: jasmine.CustomAsyncMatcherFactory = matchersUtil => {
|
||||
return {
|
||||
async compare(actualPromise: Promise<never>, expectedStatus: number, expectedMessage?: string | RegExp) {
|
||||
if (!(actualPromise instanceof Promise)) {
|
||||
@@ -49,7 +49,7 @@ const toBeRejectedWithPreviewServerError: jasmine.CustomAsyncMatcherFactory = ()
|
||||
return `${PreviewServerError.name}(${value.status}${value.message ? `, ${value.message}` : ''})`;
|
||||
}
|
||||
|
||||
return jasmine.pp(value);
|
||||
return matchersUtil.pp(value);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -225,10 +225,10 @@ describe('PreviewServerFactory', () => {
|
||||
buildCreator.emit(ChangedPrVisibilityEvent.type, {pr: 42, shas: ['12345', '67890'], isPublic: true});
|
||||
|
||||
const allCalls = prsAddCommentSpy.calls.all();
|
||||
const prs: GithubPullRequests = allCalls[0].object;
|
||||
const prs = allCalls[0].object as GithubPullRequests;
|
||||
|
||||
expect(prsAddCommentSpy).toHaveBeenCalledTimes(2);
|
||||
expect(prs).toBe(allCalls[1].object);
|
||||
expect(prs).toBe(allCalls[1].object as GithubPullRequests);
|
||||
expect(prs).toBeInstanceOf(GithubPullRequests);
|
||||
expect(prs.repoSlug).toBe('organisation/repo');
|
||||
});
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user