I am using mocha/supertest/should.js to test my Rest Service
GET /files/ returns file as stream.
GET /files/
How can I assert in should.js
should.js
Surprisingly, no one has suggested Buffer.equals. That seems to be the fastest and simplest approach and has been around since v0.11.
So your code would become tmpBuf.equals(testBuf)
tmpBuf.equals(testBuf)