Skip to content

Commit 8fee9a7

Browse files
authored
build: update to jasmine 4.0 (#24765)
Bumps our version to Jasmine 4.0 which contains some improvements and breaking changes.
1 parent 3660530 commit 8fee9a7

File tree

4 files changed

+25
-16
lines changed

4 files changed

+25
-16
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"@types/browser-sync": "^2.26.3",
149149
"@types/fs-extra": "^9.0.13",
150150
"@types/glob": "^7.2.0",
151-
"@types/jasmine": "^3.10.3",
151+
"@types/jasmine": "^4.0.0",
152152
"@types/luxon": "^1.27.0",
153153
"@types/marked": "^2.0.0",
154154
"@types/node": "^16.10.9",
@@ -175,8 +175,8 @@
175175
"highlight.js": "^10.7.0",
176176
"husky": "^7.0.4",
177177
"inquirer": "^8.2.0",
178-
"jasmine": "^3.6.0",
179-
"jasmine-core": "^3.6.0",
178+
"jasmine": "^4.1.0",
179+
"jasmine-core": "^4.1.0",
180180
"jsonc-parser": "^3.0.0",
181181
"kagekiri": "^1.4.1",
182182
"karma": "^6.3.12",

src/cdk/a11y/focus-trap/event-listener-inert-strategy.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class SimpleFocusTrap implements AfterViewInit {
8787

8888
// Since our custom stubbing in `patchElementFocus` won't update
8989
// the `document.activeElement`, we need to keep track of it here.
90-
activeElement: EventTarget | null;
90+
activeElement: Element | null;
9191

9292
constructor(private _focusTrapFactory: ConfigurableFocusTrapFactory) {}
9393

@@ -100,7 +100,10 @@ class SimpleFocusTrap implements AfterViewInit {
100100
this.secondFocusableElement,
101101
].forEach(({nativeElement}) => {
102102
patchElementFocus(nativeElement);
103-
nativeElement.addEventListener('focus', event => (this.activeElement = event.target));
103+
nativeElement.addEventListener(
104+
'focus',
105+
event => (this.activeElement = event.target as Element),
106+
);
104107
});
105108

106109
this.focusTrap = this._focusTrapFactory.create(this.focusTrapElement.nativeElement);

src/cdk/schematics/testing/test-case-setup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ export function defineJasmineTestCases(
182182
// No test cases for the given version are available. Skip setting up tests for that
183183
// version.
184184
if (!inputFiles) {
185+
// Jasmine throws an error if there's a `describe` without any tests.
186+
it('should pass', () => {});
185187
return;
186188
}
187189

yarn.lock

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@
324324

325325
"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#31b7db764ea2883386d40b7ffda60bd773dc9dd7":
326326
version "0.0.0-b26959063a9a0bdc1fca8a82c2fc545089be706c"
327-
uid "31b7db764ea2883386d40b7ffda60bd773dc9dd7"
328327
resolved "https://github.com/angular/dev-infra-private-builds.git#31b7db764ea2883386d40b7ffda60bd773dc9dd7"
329328
dependencies:
330329
"@angular-devkit/build-angular" "14.0.0-next.8"
@@ -3182,10 +3181,10 @@
31823181
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44"
31833182
integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==
31843183

3185-
"@types/jasmine@^3.10.3":
3186-
version "3.10.5"
3187-
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.10.5.tgz#ae155a9ec66e765c39646fb74c438cffcd6e3f78"
3188-
integrity sha512-RYxEJkk/RK1S6W0nMOx9Mxm5v2bKwAVjzTHiBcHkQskwKDqHKHjSU46jx/q9IffyuctNl8ebaAjb5/461faKqQ==
3184+
"@types/jasmine@^4.0.0":
3185+
version "4.0.2"
3186+
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-4.0.2.tgz#9a03589f6aa00ef42a90a8d37f09c893efced14c"
3187+
integrity sha512-mSPIWhDyQ4nzYdR6Ixy15VhVKMVw93mSUlQxxpVb4S9Hj90lBvg+7kkBw23uYcv8CESPPXit+u3cARYcPeC8Jg==
31893188

31903189
"@types/json-buffer@~3.0.0":
31913190
version "3.0.0"
@@ -9732,11 +9731,16 @@ isurl@^1.0.0-alpha5:
97329731
has-to-string-tag-x "^1.2.0"
97339732
is-object "^1.0.1"
97349733

9735-
jasmine-core@^3.6.0, jasmine-core@~3.99.0:
9734+
jasmine-core@^3.6.0:
97369735
version "3.99.1"
97379736
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.99.1.tgz#5bfa4b2d76618868bfac4c8ff08bb26fffa4120d"
97389737
integrity sha512-Hu1dmuoGcZ7AfyynN3LsfruwMbxMALMka+YtZeGoLuDEySVmVAPaonkNoBRIw/ectu8b9tVQCJNgp4a4knp+tg==
97399738

9739+
jasmine-core@^4.1.0:
9740+
version "4.1.0"
9741+
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-4.1.0.tgz#2377349b0e8bfd3fbdb36c9e4f09e3b1a17cf5c2"
9742+
integrity sha512-8E8BiffCL8sBwK1zU9cbavLe8xpJAgOduSJ6N8PJVv8VosQ/nxVTuXj2kUeHxTlZBVvh24G19ga7xdiaxlceKg==
9743+
97409744
jasmine-core@~2.8.0:
97419745
version "2.8.0"
97429746
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
@@ -9759,13 +9763,13 @@ jasmine@2.8.0:
97599763
glob "^7.0.6"
97609764
jasmine-core "~2.8.0"
97619765

9762-
jasmine@^3.6.0:
9763-
version "3.99.0"
9764-
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.99.0.tgz#7cc7aeda7ade2d57694fc818a374f778cbb4ea62"
9765-
integrity sha512-YIThBuHzaIIcjxeuLmPD40SjxkEcc8i//sGMDKCgkRMVgIwRJf5qyExtlJpQeh7pkeoBSOe6lQEdg+/9uKg9mw==
9766+
jasmine@^4.1.0:
9767+
version "4.1.0"
9768+
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-4.1.0.tgz#0de347ca8bb6cc764b0ed186ae4cfc45bd64bdc4"
9769+
integrity sha512-4VhjbUgwfNS9CBnUMoSWr9tdNgOoOhNIjAD8YRxTn+PmOf4qTSC0Uqhk66dWGnz2vJxtNIU0uBjiwnsp4Ud9VA==
97669770
dependencies:
97679771
glob "^7.1.6"
9768-
jasmine-core "~3.99.0"
9772+
jasmine-core "^4.1.0"
97699773

97709774
jasminewd2@^2.1.0:
97719775
version "2.2.0"

0 commit comments

Comments
 (0)