Skip to content

fix: Mocha version comparison fix#198

Open
97andrewvaldez wants to merge 2 commits intomichaelleeallen:masterfrom
97andrewvaldez:mocha-version-fix
Open

fix: Mocha version comparison fix#198
97andrewvaldez wants to merge 2 commits intomichaelleeallen:masterfrom
97andrewvaldez:mocha-version-fix

Conversation

@97andrewvaldez
Copy link

When upgrading to Mocha v10 this string comparison broke and started setting the mocha6plus variable to false. This doesn't allow the statsCollector to later get attached to the runner and caused us some issues in our pipeline.

I added semver as a simple way to check the correct versioning. If it's preferable to make a helper method instead of adding a new npm package I can do that too.

Either way, this should fix some inconsistencies that occur when using newer versions of Mocha.

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.

1 participant