Skip to content

Commit 7c40679

Browse files
devversionjelbourn
authored andcommitted
build: update jasmine types dependency (#16834)
Updates the jasmine types to the latest version. Unfortunately the update didn't bring in the types for the `jasmine.Env.configure` method, but it's still a good thing to update as it helps tsetse catch more incomplete test expectations.
1 parent 3aa5ca4 commit 7c40679

File tree

9 files changed

+17
-15
lines changed

9 files changed

+17
-15
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"@types/gulp-util": "^3.0.34",
8484
"@types/hammerjs": "^2.0.35",
8585
"@types/inquirer": "^0.0.43",
86-
"@types/jasmine": "^3.0.0",
86+
"@types/jasmine": "^3.4.0",
8787
"@types/marked": "^0.4.2",
8888
"@types/merge2": "^0.3.30",
8989
"@types/minimist": "^1.2.0",

src/cdk/a11y/aria-describer/aria-reference.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ describe('AriaReference', () => {
4646
it('should not add the same reference id if it already exists', () => {
4747
addAriaReferencedId(testElement!, 'aria-describedby', 'reference_1');
4848
addAriaReferencedId(testElement!, 'aria-describedby', 'reference_1');
49-
expect(['reference_1']);
49+
expect(getAriaReferenceIds(testElement!, 'aria-describedby'))
50+
.toEqual(['reference_1']);
5051
});
5152

5253
it('should retrieve ids that are deliminated by extra whitespace', () => {

src/cdk/table/table.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ describe('CdkTable', () => {
749749

750750
function expectNoStickyStyles(elements: any[]) {
751751
elements.forEach(element => {
752-
expect(element.classList.contains('cdk-table-sticky'));
752+
expect(element.classList.contains('cdk-table-sticky')).toBe(false);
753753
expect(element.style.position).toBe('');
754754
expect(element.style.zIndex || '0').toBe('0');
755755
['top', 'bottom', 'left', 'right'].forEach(d => {

src/material-experimental/mdc-chips/chip-row.spec.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,12 @@ describe('Row Chips', () => {
190190
});
191191

192192
describe('focus management', () => {
193-
it('sends focus to first grid cell on click', () => {
194-
dispatchFakeEvent(chipNativeElement, 'click');
193+
it('sends focus to first grid cell on mousedown', () => {
194+
dispatchFakeEvent(chipNativeElement, 'mousedown');
195195
fixture.detectChanges();
196196

197-
expect(document.activeElement!.classList.contains('mat-chip-row-focusable-text-content'));
197+
expect(document.activeElement!.classList.contains('mat-chip-row-focusable-text-content'))
198+
.toBe(true);
198199
});
199200

200201
it('emits focus only once for multiple focus() calls', () => {

src/material/button-toggle/button-toggle.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ describe('MatButtonToggle without forms', () => {
377377
fixture.detectChanges();
378378

379379
expect(buttonToggleInstances[0].checked).toBe(true);
380-
expect(groupInstance.value);
380+
expect(groupInstance.value).toBe('test1');
381381
});
382382

383383
it('should change the vertical state', () => {

src/material/core/gestures/gesture-config.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ xdescribe('GestureConfig', () => {
1818
}));
1919

2020
it('should instantiate HammerJS', () => {
21-
spyOn(window, 'Hammer' as any).and.callThrough();
21+
spyOn(window as any, 'Hammer').and.callThrough();
2222

2323
const fixture = TestBed.createComponent(ButtonWithLongpressHander);
2424
fixture.detectChanges();
@@ -38,7 +38,7 @@ xdescribe('GestureConfig', () => {
3838
})
3939
.compileComponents();
4040

41-
spyOn(window, 'Hammer' as any).and.callThrough();
41+
spyOn(window as any, 'Hammer').and.callThrough();
4242

4343
const fixture = TestBed.createComponent(ButtonWithLongpressHander);
4444
fixture.detectChanges();

src/material/datepicker/year-view.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ describe('MatYearView', () => {
108108
testComponent.date = new Date(2017, JUL, 31);
109109
fixture.detectChanges();
110110

111-
expect(testComponent.yearView._monthSelected(JUN));
111+
testComponent.yearView._monthSelected(JUN);
112112
fixture.detectChanges();
113113

114114
expect(testComponent.selected).toEqual(new Date(2017, JUN, 30));

src/youtube-player/fake-youtube-player.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function createFakeYtNamespace(): FakeYtNamespace {
4545

4646
for (const [event, callback] of playerSpy.addEventListener.calls.allArgs()) {
4747
if (event === name) {
48-
callback(arg);
48+
callback(arg as YT.PlayerEvent);
4949
}
5050
}
5151
};

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1288,10 +1288,10 @@
12881288
"@types/rx" "*"
12891289
"@types/through" "*"
12901290

1291-
"@types/jasmine@^3.0.0":
1292-
version "3.3.1"
1293-
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.3.1.tgz#b6c4f356013364e98b583647c7b3b6de6fccd2cc"
1294-
integrity sha512-JnKB+cEIFuQZXizZP6N0zxma+JlvowkjefWuL61otVmXN7Ebbs4ka3IbDVIz1pc+TCiT00q925jANz3gQJ9qXw==
1291+
"@types/jasmine@^3.4.0":
1292+
version "3.4.0"
1293+
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.0.tgz#018c56db42400c092aae47de21f710b7f04e4b06"
1294+
integrity sha512-6pUnBg6DuSB55xnxJ5+gW9JOkFrPsXkYAuqqEE8oyrpgDiPQ+TZ+1Zt4S+CHcRJcxyNYXeIXG4vHSzdF6y9Uvw==
12951295

12961296
"@types/jju@~1.4.0":
12971297
version "1.4.1"

0 commit comments

Comments
 (0)