Wallaby.js on 1.8 Broken


#1

Alright, so I’ve been trying to get Wallaby.js to work with Webstorm for the last 2 weeks, been going on with Wallaby.js Support and seems its impossible that I can use it with Meteor packages (Ex. xolvio:cleaner) We have Mocha/Chai/Sinon and we really like the approach of real time testing from Wallaby,

This is the last email I got from Wallaby support:

Hi Luis,

Thanks for the sample repo. We couldn’t get this working because the configJson.clientPaths that was referenced on line 269 of your config did not exist. It looks like this was due to a change in July 2018 (https://github.com/meteor/meteor/commit/159fcb38189c8e653a7b5babb2e1150c1750530d This link has not been clicked (https://github.com/meteor/meteor/commit/159fcb38189c8e653a7b5babb2e1150c1750530d)) which breaks the configuration file you were using.

We commented out that override and then ran into a problem, ​​Cannot find module 'meteor/meteor'​​. This is because the configuration is not actually running in the meteor runtime and there’s no library/references to load the meteor components.

We did some research and got this up and running using jest with jest-meteor-stubs (https://github.com/orangecms/jest-meteor-stubsThis link has not been clicked (https://github.com/orangecms/jest-meteor-stubs)).

We’ve checked in our changes to a fork of your repo so you can see it all working: https://github.com/wallabyjs/meteor-wallaby_not-workingThis link has not been clicked (https://github.com/wallabyjs/meteor-wallaby_not-working).

A few things to note:

- We cleaned up the directory structure a little so that node_modules is in the root of the project. You can of course adjust to suit, but Wallaby works best if you have node_modules in your project root.
- You can run npm run test to run jest and your tests from the CLI
- You no longer need to run the meteor app in order to run the current set of tests

So it seems that https://github.com/meteor/meteor/commit/159fcb38189c8e653a7b5babb2e1150c1750530d broke the configuration I was trying to use that imports meteor packages.

Any help will be highly appreciated!


Writing tests for meteor applications
#2

@hwillson - any take on this? Seems it was working (as per @florianbienefelt - he posted a working config) until the changes in that Meteor commit @mexin outlined.

Testing with Meteor has been a PITA so far, I wonder how everyone else is doing it (I mean when you run more than 50 tests).

Adding @benjamn who did the commit


#3

I simply do not test anything with wallaby that requires meteor, I don’t think there’s an easy way to do it.

What I do is I point wallaby to a folder filled with my own stubs for the meteor packages in case it encounters one, but they don’t actually work.

Massive annoyance, indeed!


#4

@a4xrbj1 I love Wallaby.js, but its compatibility with Meteor is not something we check for, when making core improvements to Meteor’s internals (like the mentioned Meteor Tool bundler commit does). Improving Meteor’s Wallaby support is not something that’s currently planned internally, but if anyone is interested in improving Meteor’s Wallaby or testing support in general, please kick start a discussion over in http://github.com/meteor/meteor-feature-requests. That being said, you can definitely still use Wallaby with Meteor, but it can take a bit of work to get setup properly. I outlined some of this a while back in: