Skip to content
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

Reset context between test functions #3506

Merged
merged 1 commit into from
May 11, 2017
Merged

Conversation

thymikee
Copy link
Collaborator

@thymikee thymikee commented May 7, 2017

Summary

Currently the this context we're passing in before/after (although here this is undefined, and I didn't even try to investigate why) and it/test functions is preserved across consequent test runs, which makes it confusing to use (see #3505).

As a workaround I propose passing empty object as a context for each function. This way we can still use this in test but it will be unique for each test function.

Fixes #3505.

Test plan

I'll add an integration test later, after we agree this is the right solution.

@codecov-io
Copy link

Codecov Report

Merging #3506 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3506   +/-   ##
=======================================
  Coverage   62.28%   62.28%           
=======================================
  Files         181      181           
  Lines        6700     6700           
  Branches        5        5           
=======================================
  Hits         4173     4173           
  Misses       2525     2525           
  Partials        2        2
Impacted Files Coverage Δ
packages/jest-jasmine2/src/jasmine-async.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 992e991...a2fba70. Read the comment docs.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests break after upgrade to jest 20.0.0 from 19.0.2
4 participants