feat(NODE-7335): Create dedicated mocha runner with isolated vm context#4876
Draft
PavelSafronov wants to merge 15 commits intomongodb:mainfrom
Draft
feat(NODE-7335): Create dedicated mocha runner with isolated vm context#4876PavelSafronov wants to merge 15 commits intomongodb:mainfrom
PavelSafronov wants to merge 15 commits intomongodb:mainfrom
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary of Changes
Adds a way to run unit and integration tests against a special version of Node Driver where we block specific
requirecalls. This is so we can be confident that our updates don't accidentally re-introduce a dependence on Node.Notes for Reviewers
Below are steps for testing this out locally with timeout unit tests and CRUD API integ tests, the only tests we have migrated so far to support this new testing approach.
Steps to test unit tests
src/timeout.tsaround line 62, in the private constructornpm run check:unitnpm run check:unit-bundledSteps to test unit tests
src/mongo_client.ts, around line 430, in the constructornpm run check:testnpm run check:test-bundledWhat is the motivation for this change?
To fail our tests if our code starts to use a prohibited import, so we can guarantee that the driver will work in a non-Node runtime.
Release Highlight
Release notes highlight
Double check the following
npm run check:lint)type(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript