Skip to content

Conversation

@chrisberthe
Copy link
Contributor

Several tests in the theme component commands were failing because of issues with the oclif.manifest.json file, which oclif uses to register and discover commands.

When one command calls another (e.g., Install.run() calling Map.run()), oclif uses the manifest to resolve commands. If the manifest is out of sync with the code, command resolution fails silently, causing test failures.

This PR:

  • Fixes tests in dev.test.ts by directly calling Dev.run() and properly stubbing the static methods of dependent commands
  • Fixes tests in install.test.ts by stubbing the prototype's run method of dependent commands
  • Adds a new test to install.test.ts verify commands are executed in the correct order
  • Updates tests to bypass oclif's command resolution mechanism, making them independent of the oclif.manifest.json file's state

@chrisberthe chrisberthe merged commit aa61294 into main Mar 13, 2025
3 checks passed
@chrisberthe chrisberthe deleted the fix-failing-tests-when-oclif-manifest-file branch March 13, 2025 21:58
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