Skip to content

Commit 9488181

Browse files
committed
use no_error schema instead of empty mock
1 parent 7525b91 commit 9488181

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/specs/component.app.spec.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ Unit tests for the App component. We need to test...
77
88
/*******************************************/
99

10-
// --------------- Child component stubs -----------------
11-
12-
import { Component } from '@angular/core';
13-
14-
@Component({
15-
selector: 'battle',
16-
template: ''
17-
})
18-
class FakeBattle {}
19-
2010
// --------------- Service mocks ---------------
2111

2212
import * as sinon from 'sinon';
@@ -29,12 +19,14 @@ const fakeAuthService = {
2919
// --------------- Test config ---------------
3020

3121
import { CommonModule } from '@angular/common';
22+
import { NO_ERRORS_SCHEMA } from '@angular/core';
3223
import { AuthService } from '../services/authservice';
3324
import { AppComponent } from '../components/app';
3425

3526
const testModuleConfig = {
3627
imports: [CommonModule],
37-
declarations: [AppComponent, FakeBattle],
28+
declarations: [AppComponent],
29+
schemas: [NO_ERRORS_SCHEMA], // to prevent complaints about unknown 'battle' element
3830
providers: [{provide: AuthService, useValue: fakeAuthService}]
3931
}
4032

0 commit comments

Comments
 (0)