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

Migrate tests to Jest #261

Merged
merged 1 commit into from
Jul 21, 2020
Merged

Migrate tests to Jest #261

merged 1 commit into from
Jul 21, 2020

Conversation

ohad2712
Copy link
Contributor

@ohad2712 ohad2712 commented Jul 20, 2020

We're in the process of moving the Broker to TypeScript so that we can improve our confidence when upgrading dependencies and making other changes. However, the legacy testing frameworks and tools were making progress slow. Given the tests need to also roll forward, we've opted to migrate these first. In general, the tests should be mostly identical, but instead of using proxyquire, tap, sinon and require-reload, tap-only, we use Jest.

The aim is not to make the tests "better" yet, only to focus on modernising the infrastructure without any changes to the source code. This should make the test migrations easier to read and review.

  • Delete the object assign test. I trust Node not to break Object.assign()
  • Re-enabled the proxying-decision test. This had a bad file extension, so it probably wasn't picked up by Tap for the past 3 years

@ohad2712 ohad2712 requested a review from a team July 20, 2020 15:05
We're in the process of moving the Broker to TypeScript so that we can
improve our confidence when upgrading dependencies and making other
changes. However, the legacy testing frameworks and tools were making
progress slow. Given the tests need to also roll forward, we've opted to
migrate these first. In general, the tests should be mostly identical,
but instead of using `proxyquire`, `tap`, `sinon` and `require-reload`
we only use Jest.

The aim is not to make the tests "better" yet, only to focus on
modernising the infrastructure without any changes to the source code.
This should make the test migrations easier to read and review.

- Delete the object assign test. I trust Node not to break
  Object.assign()
- Re-enabled the proxying-decision test. This had a bad file extension,
  so it probably wasn't picked up by Tap for the past 3 years
@ohad2712 ohad2712 force-pushed the chore/convert-tests-to-jest branch from 7c60837 to b3322ba Compare July 20, 2020 15:07
@ohad2712 ohad2712 merged commit 64eb4ee into master Jul 21, 2020
@ohad2712 ohad2712 deleted the chore/convert-tests-to-jest branch July 21, 2020 07:01
@snyksec
Copy link

snyksec commented Jul 22, 2020

🎉 This PR is included in version 4.86.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@snyk snyk deleted a comment from Jimimaku Nov 28, 2022
@snyk snyk deleted a comment from Jimimaku Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants