Skip to content

Commit cc8c49b

Browse files
crisbetoandrewseguin
authored andcommitted
build: fix unformatted files (#24231)
The formatting CI check only verifies changed files which means that some failures snuck in when we merged a passing commit after them. I also fixed a couple of deprecated signature usages in tests. (cherry picked from commit 70120bd)
1 parent ce9d8ca commit cc8c49b

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

src/cdk/a11y/focus-monitor/focus-monitor.spec.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,14 @@ describe('FocusMonitor', () => {
196196
flush();
197197

198198
expect(buttonElement.classList.length)
199-
.withContext('button should have exactly 2 focus classes').toBe(2);
199+
.withContext('button should have exactly 2 focus classes')
200+
.toBe(2);
200201
expect(buttonElement.classList.contains('cdk-focused'))
201-
.withContext('button should have cdk-focused class').toBe(true);
202+
.withContext('button should have cdk-focused class')
203+
.toBe(true);
202204
expect(buttonElement.classList.contains('cdk-keyboard-focused'))
203-
.withContext('button should have cdk-keyboard-focused class').toBe(true);
205+
.withContext('button should have cdk-keyboard-focused class')
206+
.toBe(true);
204207
expect(changeHandler).toHaveBeenCalledWith('keyboard');
205208
}));
206209

src/cdk/table/table.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDes
620620
this._customRowDefs,
621621
this._customHeaderRowDefs,
622622
this._customFooterRowDefs,
623-
this._columnDefsByName
623+
this._columnDefsByName,
624624
].forEach(def => {
625625
def.clear();
626626
});

src/material-experimental/mdc-autocomplete/autocomplete.spec.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,8 @@ describe('MDC-based MatAutocomplete', () => {
10881088
it('should not interfere with the ENTER key when pressing a modifier', fakeAsync(() => {
10891089
const trigger = fixture.componentInstance.trigger;
10901090

1091-
expect(input.value).toBeFalsy('Expected input to start off blank.');
1092-
expect(trigger.panelOpen).toBe(true, 'Expected panel to start off open.');
1091+
expect(input.value).withContext('Expected input to start off blank.').toBeFalsy();
1092+
expect(trigger.panelOpen).withContext('Expected panel to start off open.').toBe(true);
10931093

10941094
fixture.componentInstance.trigger._handleKeydown(DOWN_ARROW_EVENT);
10951095
flush();
@@ -1099,12 +1099,11 @@ describe('MDC-based MatAutocomplete', () => {
10991099
fixture.componentInstance.trigger._handleKeydown(ENTER_EVENT);
11001100
fixture.detectChanges();
11011101

1102-
expect(trigger.panelOpen).toBe(true, 'Expected panel to remain open.');
1103-
expect(input.value).toBeFalsy('Expected input to remain blank.');
1104-
expect(ENTER_EVENT.defaultPrevented).toBe(
1105-
false,
1106-
'Expected the default ENTER action not to have been prevented.',
1107-
);
1102+
expect(trigger.panelOpen).withContext('Expected panel to remain open.').toBe(true);
1103+
expect(input.value).withContext('Expected input to remain blank.').toBeFalsy();
1104+
expect(ENTER_EVENT.defaultPrevented)
1105+
.withContext('Expected the default ENTER action not to have been prevented.')
1106+
.toBe(false);
11081107
}));
11091108

11101109
it('should fill the text field, not select an option, when SPACE is entered', () => {

src/material/autocomplete/autocomplete.spec.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -1084,8 +1084,8 @@ describe('MatAutocomplete', () => {
10841084
it('should not interfere with the ENTER key when pressing a modifier', fakeAsync(() => {
10851085
const trigger = fixture.componentInstance.trigger;
10861086

1087-
expect(input.value).toBeFalsy('Expected input to start off blank.');
1088-
expect(trigger.panelOpen).toBe(true, 'Expected panel to start off open.');
1087+
expect(input.value).withContext('Expected input to start off blank.').toBeFalsy();
1088+
expect(trigger.panelOpen).withContext('Expected panel to start off open.').toBe(true);
10891089

10901090
fixture.componentInstance.trigger._handleKeydown(DOWN_ARROW_EVENT);
10911091
flush();
@@ -1095,12 +1095,11 @@ describe('MatAutocomplete', () => {
10951095
fixture.componentInstance.trigger._handleKeydown(ENTER_EVENT);
10961096
fixture.detectChanges();
10971097

1098-
expect(trigger.panelOpen).toBe(true, 'Expected panel to remain open.');
1099-
expect(input.value).toBeFalsy('Expected input to remain blank.');
1100-
expect(ENTER_EVENT.defaultPrevented).toBe(
1101-
false,
1102-
'Expected the default ENTER action not to have been prevented.',
1103-
);
1098+
expect(trigger.panelOpen).withContext('Expected panel to remain open.').toBe(true);
1099+
expect(input.value).withContext('Expected input to remain blank.').toBeFalsy();
1100+
expect(ENTER_EVENT.defaultPrevented)
1101+
.withContext('Expected the default ENTER action not to have been prevented.')
1102+
.toBe(false);
11041103
}));
11051104

11061105
it('should fill the text field, not select an option, when SPACE is entered', () => {

src/material/select/select.spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -3184,7 +3184,6 @@ describe('MatSelect', () => {
31843184
expect(fixture.componentInstance.control.value).toBe('pizza-1');
31853185
expect(fixture.componentInstance.select.value).toBe('pizza-1');
31863186
}));
3187-
31883187
});
31893188

31903189
describe('with custom trigger', () => {

0 commit comments

Comments
 (0)