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
actual
Consider this code:
const test = () => { throw new Error("Hi there"); }; describe("module", () => { it("throws correct error", () => { test.must.throw(Error, "Hello world"); }); });
My IDE (PHPStorm 2017.1) can't diff expected and actual values for this, printing:
AssertionError: function test() { throw new Error("Hi there"); } must throw "Hello world" Expected :"Hello world" Actual :{}
Actual value seems to be Error object here.
Test case for the bug itself:
const test = () => { throw new Error("Hi there"); }; describe("must.throw", () => { it("returns correct actual value", () => { try { test.must.throw(Error, "Hello world"); } catch (e) { e.expected.must.equal("Hello world"); e.actual.must.equal("Hi there"); } }); });
This prints:
AssertionError: {"message":"Hi there"} must equal "Hi there" Expected :"Hi there" Actual :{}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consider this code:
My IDE (PHPStorm 2017.1) can't diff expected and actual values for this, printing:
Actual value seems to be Error object here.
Test case for the bug itself:
This prints:
The text was updated successfully, but these errors were encountered: