Skip to content

build: update to jasmine 4.0 #24765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"@types/browser-sync": "^2.26.3",
"@types/fs-extra": "^9.0.13",
"@types/glob": "^7.2.0",
"@types/jasmine": "^3.10.3",
"@types/jasmine": "^4.0.0",
"@types/luxon": "^1.27.0",
"@types/marked": "^2.0.0",
"@types/node": "^16.10.9",
Expand All @@ -175,8 +175,8 @@
"highlight.js": "^10.7.0",
"husky": "^7.0.4",
"inquirer": "^8.2.0",
"jasmine": "^3.6.0",
"jasmine-core": "^3.6.0",
"jasmine": "^4.1.0",
"jasmine-core": "^4.1.0",
"jsonc-parser": "^3.0.0",
"kagekiri": "^1.4.1",
"karma": "^6.3.12",
Expand Down
7 changes: 5 additions & 2 deletions src/cdk/a11y/focus-trap/event-listener-inert-strategy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class SimpleFocusTrap implements AfterViewInit {

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

constructor(private _focusTrapFactory: ConfigurableFocusTrapFactory) {}

Expand All @@ -100,7 +100,10 @@ class SimpleFocusTrap implements AfterViewInit {
this.secondFocusableElement,
].forEach(({nativeElement}) => {
patchElementFocus(nativeElement);
nativeElement.addEventListener('focus', event => (this.activeElement = event.target));
nativeElement.addEventListener(
'focus',
event => (this.activeElement = event.target as Element),
);
});

this.focusTrap = this._focusTrapFactory.create(this.focusTrapElement.nativeElement);
Expand Down
2 changes: 2 additions & 0 deletions src/cdk/schematics/testing/test-case-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ export function defineJasmineTestCases(
// No test cases for the given version are available. Skip setting up tests for that
// version.
if (!inputFiles) {
// Jasmine throws an error if there's a `describe` without any tests.
it('should pass', () => {});
return;
}

Expand Down
26 changes: 15 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@

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

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

"@types/json-buffer@~3.0.0":
version "3.0.0"
Expand Down Expand Up @@ -9732,11 +9731,16 @@ isurl@^1.0.0-alpha5:
has-to-string-tag-x "^1.2.0"
is-object "^1.0.1"

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

jasmine-core@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-4.1.0.tgz#2377349b0e8bfd3fbdb36c9e4f09e3b1a17cf5c2"
integrity sha512-8E8BiffCL8sBwK1zU9cbavLe8xpJAgOduSJ6N8PJVv8VosQ/nxVTuXj2kUeHxTlZBVvh24G19ga7xdiaxlceKg==

jasmine-core@~2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
Expand All @@ -9759,13 +9763,13 @@ jasmine@2.8.0:
glob "^7.0.6"
jasmine-core "~2.8.0"

jasmine@^3.6.0:
version "3.99.0"
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.99.0.tgz#7cc7aeda7ade2d57694fc818a374f778cbb4ea62"
integrity sha512-YIThBuHzaIIcjxeuLmPD40SjxkEcc8i//sGMDKCgkRMVgIwRJf5qyExtlJpQeh7pkeoBSOe6lQEdg+/9uKg9mw==
jasmine@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-4.1.0.tgz#0de347ca8bb6cc764b0ed186ae4cfc45bd64bdc4"
integrity sha512-4VhjbUgwfNS9CBnUMoSWr9tdNgOoOhNIjAD8YRxTn+PmOf4qTSC0Uqhk66dWGnz2vJxtNIU0uBjiwnsp4Ud9VA==
dependencies:
glob "^7.1.6"
jasmine-core "~3.99.0"
jasmine-core "^4.1.0"

jasminewd2@^2.1.0:
version "2.2.0"
Expand Down