Skip to content

Commit

Permalink
chore: fix test compilation errors
Browse files Browse the repository at this point in the history
Fixes some more test compilation issues after removing the `extendObject`.
  • Loading branch information
crisbeto committed Nov 20, 2017
1 parent 05084e9 commit 8a1f439
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/lib/menu/menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
MatMenuItem,
} from './index';
import {MENU_PANEL_TOP_PADDING} from './menu-trigger';
import {extendObject, MatRipple} from '@angular/material/core';
import {MatRipple} from '@angular/material/core';
import {
dispatchKeyboardEvent,
dispatchMouseEvent,
Expand Down Expand Up @@ -442,7 +442,7 @@ describe('MatMenu', () => {

constructor(ctor: {new(): T; }, inputs: {[key: string]: any} = {}) {
this.fixture = TestBed.createComponent(ctor);
extendObject(this.fixture.componentInstance, inputs);
Object.keys(inputs).forEach(key => this.fixture.componentInstance[key] = inputs[key]);
this.fixture.detectChanges();
this.trigger = this.fixture.componentInstance.triggerEl.nativeElement;
}
Expand All @@ -453,7 +453,7 @@ describe('MatMenu', () => {
}

updateTriggerStyle(style: any) {
return extendObject(this.trigger.style, style);
return {...this.trigger.style, ...style};
}


Expand Down
3 changes: 1 addition & 2 deletions src/lib/select/select.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import {
} from '@angular/forms';
import {
ErrorStateMatcher,
extendObject,
FloatPlaceholderType,
MAT_PLACEHOLDER_GLOBAL_OPTIONS,
MatOption,
Expand Down Expand Up @@ -3984,7 +3983,7 @@ class NgModelCompareWithSelect {
compareByReference(f1: any, f2: any) { return f1 === f2; }

setFoodByCopy(newValue: {value: string, viewValue: string}) {
this.selectedFood = extendObject({}, newValue);
this.selectedFood = {...{}, ...newValue};
}
}

Expand Down

0 comments on commit 8a1f439

Please sign in to comment.