Skip to content

Commit a27b31a

Browse files
committed
fixing broken unit test, applying bugfix for windows, see angular/angular-cli#977
1 parent 91bf5f8 commit a27b31a

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

book-rating/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "ng serve",
88
"postinstall": "typings install",
99
"lint": "tslint \"src/**/*.ts\"",
10-
"test": "ng test",
10+
"test": "ng build && ng test --build=false",
1111
"pree2e": "webdriver-manager update",
1212
"e2e": "protractor"
1313
},

book-rating/src/app/app.component.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ beforeEachProviders(() => [AppComponent]);
1212

1313
describe('App: BookRating', () => {
1414
it('should create the app',
15-
inject([AppComponent], (app: AppComponent) => {
16-
expect(app).toBeTruthy();
17-
}));
15+
inject([AppComponent], (app: AppComponent) => {
16+
expect(app).toBeTruthy();
17+
}));
1818

19-
it('should have as title \'app works!\'',
20-
inject([AppComponent], (app: AppComponent) => {
21-
expect(app.title).toEqual('app works!');
22-
}));
19+
it('should have as title "Book Rating"',
20+
inject([AppComponent], (app: AppComponent) => {
21+
expect(app.title).toEqual('Book Rating');
22+
}));
2323
});

book-rating/src/app/dashboard/dashboard.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
*ngFor="let book of books"></br-book>
44

55

6-
Anzahl Bücher: {{ books.length }}
6+
Anzahl Bücher: <b>{{ books.length }}</b>

book-rating/src/app/shared/book.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ export class Book {
22
constructor(public title: string,
33
public description: string,
44
public rating = 0) { }
5+
6+
// rateUp
7+
8+
// rateDown
59
}

0 commit comments

Comments
 (0)