Skip to content

Commit 14058c2

Browse files
committed
refactor(test-project): reformat test angular project to LF endings
1 parent 023516d commit 14058c2

File tree

2 files changed

+33
-50
lines changed

2 files changed

+33
-50
lines changed

tests/test-angular-project/src/api-tests/pet.service.spec.ts

+5-8
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,11 @@ describe('PetService', () => {
108108
)
109109
.subscribe(() => {});
110110

111-
const {
112-
headers,
113-
params,
114-
body,
115-
}: HttpRequest<FormData> = backend.expectOne({
116-
method: 'POST',
117-
url: '/pet/1',
118-
}).request;
111+
const { headers, params, body }: HttpRequest<FormData> =
112+
backend.expectOne({
113+
method: 'POST',
114+
url: '/pet/1',
115+
}).request;
119116

120117
await expect(headers.get('auth')).toEqual('custom auth header');
121118

tests/test-angular-project/src/app/app.component.spec.ts

+28-42
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,36 @@ import { AppComponent } from './app.component';
33
import { AppModule } from './app.module';
44

55
describe('AppComponent', () => {
6-
beforeEach(
7-
waitForAsync(() => {
8-
TestBed.configureTestingModule({
9-
imports: [AppModule],
10-
}).compileComponents();
11-
}),
12-
);
6+
beforeEach(waitForAsync(() => {
7+
TestBed.configureTestingModule({
8+
imports: [AppModule],
9+
}).compileComponents();
10+
}));
1311

14-
it(
15-
'should create the app',
16-
waitForAsync(() => {
17-
const fixture = TestBed.createComponent(AppComponent);
18-
const app = fixture.debugElement.componentInstance;
19-
expect(app).toBeTruthy();
20-
}),
21-
);
12+
it('should create the app', waitForAsync(() => {
13+
const fixture = TestBed.createComponent(AppComponent);
14+
const app = fixture.debugElement.componentInstance;
15+
expect(app).toBeTruthy();
16+
}));
2217

23-
it(
24-
`should have as title 'test-angular-project'`,
25-
waitForAsync(() => {
26-
const fixture = TestBed.createComponent(AppComponent);
27-
const app = fixture.debugElement.componentInstance;
28-
expect(app.title).toEqual('test-angular-project');
29-
}),
30-
);
18+
it(`should have as title 'test-angular-project'`, waitForAsync(() => {
19+
const fixture = TestBed.createComponent(AppComponent);
20+
const app = fixture.debugElement.componentInstance;
21+
expect(app.title).toEqual('test-angular-project');
22+
}));
3123

32-
it(
33-
'should render title in a h1 tag',
34-
waitForAsync(() => {
35-
const fixture = TestBed.createComponent(AppComponent);
36-
fixture.detectChanges();
37-
const compiled = fixture.debugElement.nativeElement;
38-
expect(compiled.querySelector('h1').textContent).toContain(
39-
'Welcome to test-angular-project!',
40-
);
41-
}),
42-
);
24+
it('should render title in a h1 tag', waitForAsync(() => {
25+
const fixture = TestBed.createComponent(AppComponent);
26+
fixture.detectChanges();
27+
const compiled = fixture.debugElement.nativeElement;
28+
expect(compiled.querySelector('h1').textContent).toContain(
29+
'Welcome to test-angular-project!',
30+
);
31+
}));
4332

44-
it(
45-
`should have list of pet store domains`,
46-
waitForAsync(() => {
47-
const fixture = TestBed.createComponent(AppComponent);
48-
const app = fixture.debugElement.componentInstance;
49-
expect(app.domains).toEqual(['pet.domain', 'user.domain']);
50-
}),
51-
);
33+
it(`should have list of pet store domains`, waitForAsync(() => {
34+
const fixture = TestBed.createComponent(AppComponent);
35+
const app = fixture.debugElement.componentInstance;
36+
expect(app.domains).toEqual(['pet.domain', 'user.domain']);
37+
}));
5238
});

0 commit comments

Comments
 (0)