Skip to content

fix: corrected stubbing errors in tests @W-21178947@#1288

Merged
jfeingold35 merged 2 commits intomainfrom
d/W-21178947
Mar 4, 2026
Merged

fix: corrected stubbing errors in tests @W-21178947@#1288
jfeingold35 merged 2 commits intomainfrom
d/W-21178947

Conversation

@jfeingold35
Copy link
Contributor

This PR is necessary for us to be able to merge core PR #1549. The stubbing in some of the tests here was insufficient to mimic a plugin, in ways that were previously not a problem but are now a problem thanks to the changes made in the core PR. So in order for those tests to pass, these tests need to be updated.

it('shows no plugins installed', async () => {
it('when no plugins installed, says so', async () => {
const config = await Config.load(import.meta.url)
sinon.stub(config, 'getPluginsList').returns([])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Stubbing an empty array didn't seem to actually do anything functionally, and was just causing the tests to explode, so I just got rid of it. All of the other tests include the existing plugin list anyway, so it follows that this one should do so as well.

"husky": "^9.1.7",
"lint-staged": "^15.5.2",
"mocha": "^10.8.2",
"mocha": "^11",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The dependency on mocha@^10 causes tests to fail on node v25, because one of the libraries uses require instead of import and that's somehow a problem. Bumping to v11 resolves this.

@jfeingold35 jfeingold35 merged commit e4e52c5 into main Mar 4, 2026
38 of 39 checks passed
@jfeingold35 jfeingold35 deleted the d/W-21178947 branch March 4, 2026 21:39
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