Skip to content

Commit 21283c4

Browse files
committed
refactor(mask): udpate test trying to assign model value
1 parent 19127db commit 21283c4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

projects/igniteui-angular/src/lib/directives/mask/mask.directive.spec.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,17 @@ describe('igxMask', () => {
129129
it('Enter value with a preset mask and value', fakeAsync(() => {
130130
const fixture = TestBed.createComponent(MaskComponent);
131131
fixture.detectChanges();
132+
tick(); // NgModel updateValue Promise
132133

133134
const comp = fixture.componentInstance;
134135
const input = comp.input;
135136

136-
input.nativeElement.dispatchEvent(new Event('input'));
137-
tick();
138137

139138
expect(input.nativeElement.value).toEqual('(123) 4567-890');
140139
expect(comp.value).toEqual('1234567890');
141140

142141
comp.value = '7777';
143142
fixture.detectChanges();
144-
145-
input.nativeElement.dispatchEvent(new Event('input'));
146143
tick();
147144

148145
expect(input.nativeElement.value).toEqual('(777) 7___-___');

0 commit comments

Comments
 (0)