Skip to content

chore(karma): remove async and done usage#3262

Merged
rwaskiewicz merged 2 commits intomainfrom
rwaskiewicz/fixup-async-karma
Mar 7, 2022
Merged

chore(karma): remove async and done usage#3262
rwaskiewicz merged 2 commits intomainfrom
rwaskiewicz/fixup-async-karma

Conversation

@rwaskiewicz
Copy link
Copy Markdown
Member

@rwaskiewicz rwaskiewicz commented Mar 3, 2022

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Unit tests (npm test) were run locally and passed
  • E2E Tests (npm run test.karma.prod) were run locally and passed
  • Prettier (npm run prettier) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

When we upgraded Stencil to internally use Jest 27 (#3171), we began
to see warnings in the console that look something like:

ERROR: 'DEPRECATION: An asynchronous before/it/after function took a done callback but also returned a promise. This is not supported and will stop working in the future. Either remove the done callback (recommended) or change the function to not return a promise. (in spec: shadow-dom-array renders children)'

This will be a blocker for an upgrade to Jest 28.

GitHub Issue Number: N/A

What is the new behavior?

I removed either the usage of the done parameter or async keyword from tests,
depending on what was required/based on the structure of the test itself

Does this introduce a breaking change?

  • Yes
  • No

Testing

I've run our Karma tests on Browserstack 50 times to try to see if this introduces any additional flakiness to the e2e tests. We saw 13 failures, most of which around disconnects from Browserstack/inability to connect to the browser in the first place. While this number is too high, I don't think it's related to these tests themselves. 😢

Other information

@rwaskiewicz rwaskiewicz changed the title WIP: remove async/done usage in karma tests chore(karma): remove async and done usage Mar 4, 2022
@rwaskiewicz rwaskiewicz marked this pull request as ready for review March 4, 2022 19:18
@rwaskiewicz rwaskiewicz requested a review from a team March 4, 2022 19:18
@rwaskiewicz rwaskiewicz mentioned this pull request Mar 4, 2022
14 tasks
@rwaskiewicz rwaskiewicz merged commit b4230b6 into main Mar 7, 2022
@rwaskiewicz rwaskiewicz deleted the rwaskiewicz/fixup-async-karma branch March 7, 2022 18:16
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.

2 participants