Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

fix: provide better error message if the contructor passed is not valid #49

Merged
merged 1 commit into from
Sep 28, 2016

Conversation

joscha
Copy link
Member

@joscha joscha commented Sep 27, 2016

Currently the error message thrown is quite cryptic when an invalid constructor is passed to reactify.

Copy link
Contributor

@treshugart treshugart left a comment

Choose a reason for hiding this comment

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

Just a minor nit.

@@ -3,6 +3,10 @@ import reactify from '../../src/index';
describe('prop-types', () => {
const msg = 'or passed via opts.';

it('no custom element', () => {
expect(() => reactify()).to.throw('Given element is not a valid constructor');
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: indentation

Copy link
Member

@stevemao stevemao left a comment

Choose a reason for hiding this comment

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

LGTM

@treshugart
Copy link
Contributor

lgtm

@treshugart treshugart merged commit 302575f into webcomponents:master Sep 28, 2016
@joscha joscha deleted the better-error-handling branch September 28, 2016 00:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants