You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If JSX code is inlined into a test assertion (e.g. using enzyme's .contains, etc) acorn from the power-assert library fails hard (fails hard enough to kill the --watch watcher):
It would be nice if AVA could expect and catch this error, prevent it from hard exiting the process, and possibly display messaging like "Unparseable (possibly JSX) code found in your test assertion. Try assigning the code to a variable first then running the assert against the variable".
The text was updated successfully, but these errors were encountered:
@dcousineau Thank you for reporting. That's a power-assert's problem and I'm trying to solve it. Sorry for inconvenience... I'll integrate it to AVA as soon as possible when the PR lands. So please stay tuned.
@dcousineau which version are you using? Could you try with master? If it still crashes perhaps you could share an example repo so I can fix the watcher crash? Thanks!
If JSX code is inlined into a test assertion (e.g. using enzyme's .contains, etc) acorn from the power-assert library fails hard (fails hard enough to kill the
--watch
watcher):The solution to fix this error is a very simple:
It would be nice if AVA could expect and catch this error, prevent it from hard exiting the process, and possibly display messaging like "Unparseable (possibly JSX) code found in your test assertion. Try assigning the code to a variable first then running the assert against the variable".
The text was updated successfully, but these errors were encountered: