January 2019
Intermediate to advanced
460 pages
10h 33m
English
We now want to check whether all the features of our application are working as expected. One major feature of our application is that React Router redirects the user in two cases:
In both cases, the user should be redirected to the login form. In the first case, we can follow the same approach as for our first test. We send a request to a path that isn't inside our router. Add the code to the bottom of the describe function:
describe('404', function() { it('redirects the user when not matching path is found', function(done) { request({ url: 'http://localhost:8000/path/to/404', ...Read now
Unlock full access