File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ describe('CatsService unit spec', () => {
71
71
beforeAll (() => {
72
72
const { unit, unitRef } = TestBed .create (CatsService )
73
73
.mock (HttpService )
74
+ .use ({ get: jest .fn () })
75
+ .mock (Logger )
76
+ .use ({ log: jest .fn () })
77
+ .mock (CatsDal )
78
+ .use ({ saveCats: jest .fn () })
74
79
.compile ();
75
80
76
81
underTest = unit ;
@@ -82,7 +87,7 @@ describe('CatsService unit spec', () => {
82
87
83
88
describe (' when getting all the cats' , () => {
84
89
test (' then meet some expectations' , async () => {
85
- httpService .mockResolvedValueOnce ([{ id: 1 , name: ' Catty' }]);
90
+ httpService .get . mockResolvedValueOnce ([{ id: 1 , name: ' Catty' }]);
86
91
await catsService .getAllCats ();
87
92
88
93
expect (logger .log ).toBeCalled ();
You can’t perform that action at this time.
0 commit comments