Should js Cannot read property ‘should’ of null
I had the same problem. I solved it by using: (err === null).should.be.true;
I had the same problem. I solved it by using: (err === null).should.be.true;
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)