-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
Using @ember/destroyable in teardownContext causes incompatibility with ember-mocha #986
Comments
I've figured out how to get around this by using a Proxy object as a temporary context |
Ya, the proxy solution seems good (to prevent shared mutation of the same context over and over again). Though, I think it would still be best if we add an option to disable destroying the test context. |
@rwjblue while I have you here, can you take a look at this PR emberjs/ember-mocha#631 that I linked above? We're currently maintaining a fork of ember-mocha because it seems like the project doesn't have any maintainers. I'd love to get that merged in and perhaps take over maintenance of the project? |
@yads - Can you make a new meta issue over there in ember-mocha so we can discuss the overall path forward? There are quite a few different open PRs and it isn't clear what the order of merging would be (or what is left to do, etc). |
@rwjblue done, see emberjs/ember-mocha#638 |
teardownContext causes ember-mocha tests to fail with:
It seems like Mocha potentially reuses contexts from test to test, so the Ember destroyable module thinks that a subsequent context is destroyed when it isn't considered destroyed by mocha or ember-mocha. This causes any tests after the first to fail at line:
ember-test-helpers/addon-test-support/@ember/test-helpers/setup-context.ts
Line 206 in f2ebea6
This is impacting this PR in ember-mocha to uplift it to the latest version of ember-test-helpers. Only calling teardownContext on
this.owner
works fine in Ember 3.20, but fails in earlier versions.The text was updated successfully, but these errors were encountered: