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
An alternative solution to #589 is to have a way of capturing variables that can be printed on assertion failures, to give them more context.
describe('foo', function() it('does something', function() for k, v in pairs({ foo = 'foo', bar = 'foo', }) do capture.key = k assert.is_equal(k, v) end end) end)
capture could be just a normal table that is reset before every test. And then on a failed assertion the table could be printed:
capture
foo.lua:8: Expected objects to be equal. Captures: key = (string) 'bar' Passed in: (string) 'foo' Expected: (string) 'bar'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
An alternative solution to #589 is to have a way of capturing variables that can be printed on assertion failures, to give them more context.
capture
could be just a normal table that is reset before every test.And then on a failed assertion the table could be printed:
The text was updated successfully, but these errors were encountered: