-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
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
Ava contexts not transformed #97
Labels
Comments
Thanks for reporting this. Let me know if you would like to try to fix it. : ) |
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');
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: