policygenius/athenaeum

Prevent undefined values in jest snapshots

Opened this issue · 0 comments

Background
A number of RCL components do not have guards around props that are undefined and simply pass those down. This can not only present a problem in use but it also shows up in jest snapshots, which doesn't provide a great way to test the expected HTML structure of our components.

We will need to do a thorough documentation of all the components that do not have this guard and determine if one is needed. Best way to do this may just be to look at a few snapshots and find patterns.

Acceptance Criteria

  • Guards are put in place to prevent unwanted/unnecessary undefined values from being applied to RCL components

Tech Notes
Here is a list of known offenders:

  • <Text />
  • <Layout />
  • <Icon />
  • <Button />
  • <LinkWrapper />