Skip to content

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

Open

Description

@deborahgu

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions