We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I call an upper level function that modifies the object before passing it to the spy function. I do not want to mock all upper level function.
Implementation.
write: async function (data) { await this.socket.write(Buffer.from(data)) }
Failure testing.
const uuid = generateUuid() operator.write(uuid) operator.socket.write.should.be.calledWith(uuid)
Temporary solution.
const calledValue = operator.socket.write.lastCall.args[0].toString() assert.equal(uuid, calledValue)
Testing solution proposed.
const uuid = generateUuid() operator.write(uuid) operator.socket.write.should.be.calledWith((value) => { return value.toString() == uuid })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I call an upper level function that modifies the object before passing it to the spy function. I do not
want to mock all upper level function.
Implementation.
Failure testing.
Temporary solution.
Testing solution proposed.
The text was updated successfully, but these errors were encountered: