You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the 404 test in the 'Testing the Server' section, I think the .get needs to be called before .expect.
The test is
it('should 404 for other pages',(done)=>{request(server).expect(404)// expect first.get('/other').end((err,res)=>{assert(res.text.includes('ERROR'),'Has expected error message')done()})})
When I runs the tests with this, I get TypeError: request(...).expect is not a function.
I think it should be
it('should 404 for other pages',(done)=>{request(server).get('/other')// get first.expect(404)// ...})})
where the get request is made before we can check the result is as expected. Doing this results in a passing test for me.
Happy to submit a PR if you all agree with my assessment.
The text was updated successfully, but these errors were encountered:
For the 404 test in the 'Testing the Server' section, I think the
.get
needs to be called before.expect
.The test is
When I runs the tests with this, I get
TypeError: request(...).expect is not a function
.I think it should be
where the get request is made before we can check the result is as expected. Doing this results in a passing test for me.
Happy to submit a PR if you all agree with my assessment.
The text was updated successfully, but these errors were encountered: