December 2017
Beginner
372 pages
10h 32m
English
The board component has multiple dependencies, namely:
So, we would need to mock all these for us to effectively test the board component. Because we are only focused on testing the add task functionality, which does not use any of these dependencies, we will just create the mocks of these dependencies, but not the spy objects like we did in our testing of the Trello service class.
Similarly, in the beforeEach function, the only thing we will do is create an instance of the board component and pass these mock dependencies, as shown in the following code:
describe('BoardComponent' ...
Read now
Unlock full access