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

Unit testing page conflicts with library console output #594

Open
apillard opened this issue Apr 6, 2020 · 2 comments
Open

Unit testing page conflicts with library console output #594

apillard opened this issue Apr 6, 2020 · 2 comments

Comments

@apillard
Copy link
Contributor

apillard commented Apr 6, 2020

The unit testing docs page here: https://stenciljs.com/docs/unit-testing describes two approaches to unit testing, using newSpecPage, or logic only testing using a new MyComponent() constructor. However, when you try to use the constructor logic only testing style, the stencil cli gives you this output. The CLI and docs should be consistent.

Also see corresponding issue against the stencil library here: ionic-team/stencil#2275

  Use "newSpecPage()" to instanciate component instances instead of "new MyComp()".
      For further information: https://stenciljs.com/docs/unit-testing#newspecpage-
@DmitryEfimenko
Copy link

there should be a way to remove the warning. Using new MyClass() approach for unit testing is perfectly valid.

@doliG
Copy link

doliG commented Feb 11, 2021

Same problem here, and totally agree with OP.

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

3 participants