DEV Community

Discussion on: Building a JavaScript Auth system using TDD (part 1)

Collapse
 
uf4no profile image
Antonio

Thanks, glad you liked it :)
You're right! actually I refactored the code in my repo to send a json:


res.send({
message: 'Hello!'
})

And in the test it's checking the message:

expect(res.statusCode).to.be.eql(200)
expect(res.body.message).to.be.equal('Hello!')

I'll update the article :)