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

Refactor Tests #1328

Open
Xiot opened this issue May 24, 2020 · 5 comments
Open

Refactor Tests #1328

Xiot opened this issue May 24, 2020 · 5 comments

Comments

@Xiot
Copy link
Contributor

Xiot commented May 24, 2020

Currently the tests directly reference the components in 'showcase'.
Tests should be using their own fixtures to test.

Move tests to use jest

@reitlepax
Copy link
Contributor

I can look into migrating the tests to jest

@reitlepax
Copy link
Contributor

reitlepax commented May 29, 2020

Tests with jest display many warning/errors coming from the react components, I am going to work on fixing them to make it easier to read tests and because many of these messages also appear in the browser console

For instance:

  • Error: Not implemented: HTMLCanvasElement.prototype.getContext (without installing the canvas npm package)
  • Warning: The tag <g> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
  • Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

@Xiot
Copy link
Contributor Author

Xiot commented May 29, 2020

The warning for <g> is interesting, as it is a valid svg tag.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g

@reitlepax
Copy link
Contributor

It is valid but the warning appears when it is not wrapped by an svg tag. I'm currently working on fixing these tests

@Xiot
Copy link
Contributor Author

Xiot commented May 29, 2020

ah.. that was my next thought. Thanks for cleaning these up.

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

2 participants