Created
July 1, 2025 14:41
-
-
Save lifeart/9eb68fe7080da7ba46bf8250b6c21239 to your computer and use it in GitHub Desktop.
Ember.js re-run initializers in qUnit tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hooks.afterEach(async function () { | |
const base = this.owner['base']; | |
/* | |
* Reset container state to be able to run initializers again | |
*/ | |
base.willDestroy(); | |
base._booted = false; | |
base._initializersRan = false; | |
base._bootPromise = undefined; | |
base._readinessDeferrals = 1; | |
base.__registry__ = base.buildRegistry(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment