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

Delete fixture and get removed fixture function for later restoration ~8 #34

Closed
justinbmeyer opened this issue May 16, 2016 · 0 comments

Comments

@justinbmeyer
Copy link
Contributor

From: canjs/canjs#810

Something like:

can.fixture("services/thing", function(){ ... CODE A ... });

// in a test, remove default fixture and provide your own
var oldFixture = can.fixture("services/thing", null);
can.fixture("services/thing", function(){ ... CODE B ... });
// run test
TEST

// restore old fixture
can.fixture("services/thing", oldFixture)
@justinbmeyer justinbmeyer added the p2 label Sep 1, 2016
@justinbmeyer justinbmeyer changed the title Delete fixture and get removed fixture function for later restoration Delete fixture and get removed fixture function for later restoration ~8 Sep 1, 2016
randallwhitlock pushed a commit that referenced this issue Aug 13, 2018
cherifGsoul pushed a commit that referenced this issue Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants