Skip to content

Commit e08c46b

Browse files
committed
test(book-static-async-service): deactivate all tests
1 parent ff4f7ed commit e08c46b

File tree

1 file changed

+5
-45
lines changed

1 file changed

+5
-45
lines changed

src/app/book/shared/book-static-async-data.service.spec.ts

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,70 +16,30 @@ describe('BookStaticAsyncDataService', () => {
1616

1717
describe('getBooks()', () => {
1818
it('should return the whole list of books with an Observable', inject([BookStaticAsyncDataService], (service: BookStaticAsyncDataService) => {
19-
let result;
20-
service.getBooks().subscribe((books) => result = books)
21-
22-
expect(result).toBe(service.staticBookData)
19+
expect(true).toBeFalsy();
2320
}));
2421
});
2522

2623
describe('getBookByIsbn(isbn)', () => {
2724
it('should return the first elemnt of data', inject([BookStaticAsyncDataService], (service: BookStaticAsyncDataService) => {
28-
let result;
29-
service.getBookByIsbn(123).subscribe((book) => result = book)
30-
31-
expect(result).toBe(service.staticBookData[0]);
25+
expect(true).toBeFalsy();
3226
}));
3327
});
3428

3529
describe('getBook(book)', () => {
3630
it('should return the book argument itself', inject([BookStaticAsyncDataService], (service: BookStaticAsyncDataService) => {
37-
let result;
38-
const book: Book = service.staticBookData[0];
39-
service.updateBook(book).subscribe((book) => result = book)
40-
41-
expect(result).toBe(service.staticBookData[0]);
31+
expect(true).toBeFalsy();
4232
}));
4333
});
4434

4535

4636
describe('createBook(book)', () => {
4737
it('should return the book argument itself', inject([BookStaticAsyncDataService], (service: BookStaticAsyncDataService) => {
48-
let result;
49-
const book: Book = {
50-
'title': 'The New Design Patterns',
51-
'subtitle': 'Elements of Reusable Object-Oriented Software',
52-
'isbn': '978-0-20163-361-0',
53-
'abstract': 'Capturing a wealth of experience about the design of object-oriented software, four top-notch designers present a catalog of simple and succinct solutions to commonly occurring design problems. Previously undocumented, these 23 patterns allow designers to create more flexible, elegant, and ultimately reusable designs without having to rediscover the design solutions themselves.',
54-
'numPages': 395,
55-
'author': 'Erich Gamma / Richard Helm / Ralph E. Johnson / John Vlissides',
56-
'publisher': {
57-
'name': 'Addison-Wesley',
58-
'url': 'http://www.addison-wesley.de/'
59-
}
60-
};
61-
62-
service.createBook(book).subscribe((book) => result = book)
63-
expect(result).toBe(book);
38+
expect(true).toBeFalsy();
6439
}));
6540

6641
it('should add the new book to the dataset', inject([BookStaticAsyncDataService], (service: BookStaticAsyncDataService) => {
67-
let result;
68-
const book: Book = {
69-
'title': 'The New Design Patterns',
70-
'subtitle': 'Elements of Reusable Object-Oriented Software',
71-
'isbn': '978-0-20163-361-0',
72-
'abstract': 'Capturing a wealth of experience about the design of object-oriented software, four top-notch designers present a catalog of simple and succinct solutions to commonly occurring design problems. Previously undocumented, these 23 patterns allow designers to create more flexible, elegant, and ultimately reusable designs without having to rediscover the design solutions themselves.',
73-
'numPages': 395,
74-
'author': 'Erich Gamma / Richard Helm / Ralph E. Johnson / John Vlissides',
75-
'publisher': {
76-
'name': 'Addison-Wesley',
77-
'url': 'http://www.addison-wesley.de/'
78-
}
79-
};
80-
81-
service.createBook(book).subscribe((book) => result = book)
82-
expect(service.staticBookData.length).toBe(4);
42+
expect(true).toBeFalsy();
8343
}));
8444
});
8545

0 commit comments

Comments
 (0)