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
test.beforeEach(t => { t.context.fn = () => 'foo'; }); test('will execute foo', t => { t.is(t.context.fn(), 'foo'); });
The t.is will be modified, but the t.context will be left in place and cause errors. Perhaps renaming and moving to the file closure would work.
t.is
https://github.com/avajs/ava#test-context
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. Let me know if you would like to try to fix it. : )
Sorry, something went wrong.
I ran into this issue as well. The easiest fix was to add this at the beginning:
const t = { context: { fn: null } } test.beforeEach(t => { t.context.fn = () => 'foo'; }); test('will execute foo', t => { t.is(t.context.fn(), 'foo'); });
No branches or pull requests
The
t.is
will be modified, but the t.context will be left in place and cause errors. Perhaps renaming and moving to the file closure would work.https://github.com/avajs/ava#test-context
The text was updated successfully, but these errors were encountered: