Skip to content

Conversation

phellipeandrade
Copy link
Owner

Summary

  • add tests for missing plugin dependencies and uninstall errors
  • ensure hooks are removed after plugin uninstall
  • exercise internal utilities and error logging for PluginManager

Testing

  • npm test
  • npm run test:coverage

https://chatgpt.com/codex/tasks/task_e_68c650e7bcd08325a8489beac507c35a

@phellipeandrade phellipeandrade merged commit 4068933 into feat/plugins Sep 14, 2025
1 of 2 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +404 to +406
it('should attempt to load plugins from directory', async () => {
await expect(pluginManager.loadPluginsFromDirectory('/tmp'))
.resolves.not.toThrow();

Choose a reason for hiding this comment

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

[P1] Use proper matcher for successful loadPluginsFromDirectory

The new test attempts to verify that loadPluginsFromDirectory doesn’t throw by doing await expect(pluginManager.loadPluginsFromDirectory('/tmp')).resolves.not.toThrow();. After .resolves the matcher is applied to the resolved value (undefined), so using toThrow raises Jest’s own assertion error (received value must be a function) and the test fails even if the method behaves correctly. To assert the absence of errors, wrap the call in a function or check the resolved value, e.g. await expect(() => pluginManager.loadPluginsFromDirectory('/tmp')).not.toThrow() or await expect(pluginManager.loadPluginsFromDirectory('/tmp')).resolves.toBeUndefined();.

Useful? React with 👍 / 👎.

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.

1 participant