Skip to content

Commit 1b37a84

Browse files
committed
Update tests
1 parent dc05c04 commit 1b37a84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/input/input.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ describe('MatInput without forms', () => {
380380

381381
let el = fixture.debugElement.query(By.css('label'));
382382
expect(el).not.toBeNull();
383-
expect(el.nativeElement.textContent).toMatch(/hello\s+\*/g);
383+
expect(el.nativeElement.textContent).toBe('hello*');
384384
}));
385385

386386
it('should hide the required star if input is disabled', () => {
@@ -392,7 +392,7 @@ describe('MatInput without forms', () => {
392392
const el = fixture.debugElement.query(By.css('label'));
393393

394394
expect(el).not.toBeNull();
395-
expect(el.nativeElement.textContent).toMatch(/^hello$/);
395+
expect(el.nativeElement.textContent).toBe('hello');
396396
});
397397

398398
it('should hide the required star from screen readers', fakeAsync(() => {
@@ -410,12 +410,12 @@ describe('MatInput without forms', () => {
410410

411411
let el = fixture.debugElement.query(By.css('label'));
412412
expect(el).not.toBeNull();
413-
expect(el.nativeElement.textContent).toMatch(/hello\s+\*/g);
413+
expect(el.nativeElement.textContent).toBe('hello*');
414414

415415
fixture.componentInstance.hideRequiredMarker = true;
416416
fixture.detectChanges();
417417

418-
expect(el.nativeElement.textContent).toMatch(/hello/g);
418+
expect(el.nativeElement.textContent).toBe('hello');
419419
}));
420420

421421
it('supports the disabled attribute as binding', fakeAsync(() => {

0 commit comments

Comments
 (0)