December 2017
Beginner
372 pages
10h 32m
English
As we mentioned earlier, we will have three test cases for our Homepage component. The first one will just check if we were able to create the component successfully. The code for this is shown here:
it('should be created', () => { expect(component).toBeTruthy(); });
As you can see, it just checks if the component exists using the toBeTruthy matcher. Whenever we write an integrated test, this test case should always be executed. This test case allows us to make sure that the component instance we have created and the dependencies we have defined are all correct and nothing is missing.
Read now
Unlock full access