Skip to content

Test throwing exceptions #579

Closed
Closed
@carloslancha

Description

In our components there're some params that are required. In those cases if the param is not passed the component throws an exception.

If we test that like in https://github.com/metal/metal-clay-components/blob/master/packages/clay-alert/src/__tests__/ClayAlert.js#L207 tests passes but in console appears the expected error.

Should we test those cases? If yes, we have to update all our tests with this and find out a way to hide those errors from the logs (like stubbing console.error). If not, we need to remove those tests from ClayAlert and ClayNavbar.

Metadata

Assignees

Labels

status: next-releaseIssues that will enter into the next release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions