Skip to content

Conversation

@NullVoxPopuli
Copy link
Collaborator

Situation:

  • have old code
  • do things in constructor instead of deriving data "on page load"
  • switch to @embroider/router
  • tests can sometimes fail now depending on execution order due to registerBundle being async (with waiters! (good)), but not all tests that call the aforementioned constructor are async, and thus wouldn't be doing anything with settled behavior anyway

Solution:

  • call await settled before destruction

{ waitForSettled = true }: TeardownContextOptions = {},
): Promise<void> {
return Promise.resolve()
.then(settled)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when does the argument waitForSettled get passed in as false, and when it does, wouldn't the new await of settled be unexpected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants