File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed
apps/fretonator-web/src/app/pages/contact/contact-success Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { async , ComponentFixture , TestBed } from '@angular/core/testing' ;
2
2
3
3
import { ContactSuccessComponent } from './contact-success.component' ;
4
+ import { Component } from '@angular/core' ;
5
+ import { ContactModule } from '../contact.module' ;
6
+ import { RouterTestingModule } from '@angular/router/testing' ;
4
7
5
8
describe ( 'ContactSuccessComponent' , ( ) => {
6
- let component : ContactSuccessComponent ;
7
- let fixture : ComponentFixture < ContactSuccessComponent > ;
9
+ @Component ( {
10
+ selector : 'app-contact-success-spec' ,
11
+ template : `
12
+ <app-contact-success></app-contact-success>
13
+ `
14
+ } )
15
+ class ContactSuccessComponentSpec {
16
+ }
17
+
18
+ let component : ContactSuccessComponentSpec ;
19
+ let fixture : ComponentFixture < ContactSuccessComponentSpec > ;
8
20
9
21
beforeEach ( async ( ( ) => {
10
22
TestBed . configureTestingModule ( {
11
- declarations : [ ContactSuccessComponent ]
12
- } )
13
- . compileComponents ( ) ;
23
+ declarations : [ ContactSuccessComponentSpec ] ,
24
+ imports : [
25
+ ContactModule ,
26
+ RouterTestingModule
27
+ ]
28
+ } ) . compileComponents ( ) ;
14
29
} ) ) ;
15
30
16
31
beforeEach ( ( ) => {
17
- fixture = TestBed . createComponent ( ContactSuccessComponent ) ;
32
+ fixture = TestBed . createComponent ( ContactSuccessComponentSpec ) ;
18
33
component = fixture . componentInstance ;
19
34
fixture . detectChanges ( ) ;
20
35
} ) ;
You can’t perform that action at this time.
0 commit comments