Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write unit tests for plugin scenarios not already tested for #73

Open
deborahgu opened this issue Jun 12, 2024 · 0 comments
Open

Write unit tests for plugin scenarios not already tested for #73

deborahgu opened this issue Jun 12, 2024 · 0 comments

Comments

@deborahgu
Copy link
Member

Some unit tests have already been written to test for iFrame-based Plugins, PluginContainer, and ideally by this point the Direct Plugin and mixed Plugin Slots.

There are definitely some areas of the library that could use unit tests to confirm our assumptions.

Things worth testing include:

  • Plugin Slot
    • it should return nothing if there’s no configuration and no default component
    • it should only return default component if there’s no configuration
    • it should return a React component given a config for one plugin
    • it should only return plugins that have a valid configuration (ie. missing key attributes for iFrame or Direct plugin)
  • Plugin Container iFrame
    • it should return an iFrame with a React component when given a config
  • Consolidate any mock objects (i.e. iframeConfig, directConfig) where possible
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

No branches or pull requests

1 participant