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

Cannot show descriptive assertion messages #4

Closed
kazupon opened this issue Sep 11, 2015 · 4 comments
Closed

Cannot show descriptive assertion messages #4

kazupon opened this issue Sep 11, 2015 · 4 comments

Comments

@kazupon
Copy link

kazupon commented Sep 11, 2015

When i was using webpack-espower-loader in my environment (https://github.com/kazupon/vue-plugin-boilerplate), it's works.
However When the test was failed, power-assert cannot show the descriptive assertion messages.

Please see the detail error log (karma reporter: progress):
https://gist.github.com/kazupon/3ceabbe4cac1b703aa17

I become curious about the following warning messages has been output.

WARNING in ./~/power-assert/~/power-assert-formatter/lib/create.js
Critical dependencies:

What I'm doing wrong?

Thanks!

@twada
Copy link
Member

twada commented Sep 11, 2015

Hi @kazupon, thank you for reporting.

To write tests in ES6 with Babel, please use babel-plugin-espower or espower-babel (espower-babel uses babel-plugin-espower internally).

webpack-espower-loader (and the other instrumentors) transforms code after babel, which does not work since babel's output has changed.

babel-plugin-espower works as a babel plugin and runs before babel's transformation, so it works as expected.

FYI: I made a pull-req for you

Warning from webpack is due to the use of a dynamic require (which is inevitable hack for plugin system) and is not really an issue, just a warning. Please ignore it though you may feel uncomfortable with.

@kazupon
Copy link
Author

kazupon commented Sep 11, 2015

I confirmed that it works.
Thanks !! 💯

@kazupon kazupon closed this as completed Sep 11, 2015
@twada
Copy link
Member

twada commented Sep 11, 2015

Thank you for reporting! 👍
Also noticed that this should be in power-assert FAQ.

@kazupon
Copy link
Author

kazupon commented Sep 11, 2015

Awesome !! 👍
That would be great for everyone.

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