-
Notifications
You must be signed in to change notification settings - Fork 14
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
Istanbul babel plugin #73
Conversation
Yeah the code is much simpler on this PR that what we have on master. Massive work as always ! 🥇 I don't think too there is a babel option for packages... But maybe we can use the empty meteor app that I create on test to setup babel . |
I can confirm that the code coverage is way more accurate with the babel plugin (specially if you heavily use ECMAScript+ features) and it will most-likely therefore also take down the result of your coverage reports - down to their actual value 😄 |
Wonderful ! It looks really nice ! We will ship this in a v3 release when it will be tested and some doc rewrited. We need to find a solution for packages too, if we just need an empty meteor app that's fine... |
It has been a quite long time, but now I finally found some time to fork it and update the files there. I can hereby prove that the coverage of project-files work and is quite stable. The coverage of meteor-packages does not work as of now, because I have no idea how to add the babel-plugin to the list of babel-plugins which are ran over the generated packages - this is something I'm still investigating on ... Here's the link to the repository: https://github.com/SimonSimCity/meteor-coverage-app-exemple Please ping me if you know anything more - specially anything about the babel-compiling of meteor-plugins. Btw: I had to update the project to Meteor v1.7 because the package-tests didn't run on 1.6 for some reason - didn't investigate any longer because it only pointed me to a compatibility-issue which was introduced in babel-beta >55, but I had it installed in beta-45. Running the tests of meteor-coverage now fails, but it's only the reports. I guess there's still something I need to fix there. |
Ooooh ! I will need to get some time to investigate this and merge everything ! |
Just to add some hints ...
|
Ohhh ! I get some time to test it and this is working very great so far ! There is nothing to fix on this PR, even if we loose the support for packages, the quality of the instrumentation is much better and makes the change worth enough. And this is quite intuitive so the tutorial won't be complicated. |
This will also require a completely different setup for the coming version of meteor-coverage ... and I wonder what a good way of introducing this would be. The I'm also working on a rewrite of the chapter of testing in the meteor guide (https://forums.meteor.com/t/which-testing-frameworks-are-popular-today-end-2018/46480) where this package also will be mentioned in connection with the other testing frameworks it works together with. I'm glad we got this great improvement finally landed and I'll continue searching for a way to get this work for meteor-packages - don't know how active but I'll definitively give it a second try. |
Yes that's not yet finished! One good point is the new application setup, that's so easy if we look at this tiny commit. I will use that app in meteor-coverage-app-exemple to create the new minimal setup. If you think we can add more, feel free to submit a PR or an issue against that repo. There is a lot of work to rewrite the readme of this repo, but I have some ideas, I just some spare time ! As you say, there is much more to do on the meteor testing guide. The base is good but some dependencies are outdated and there is details completly missing when it goes to real world. They should consider the reader as an open source app creator that wants to runs its tests on a free CI platform. It should be done under 15 mins, without jumping from section to other section. About package coverage, I have two solutions in mind :
|
I've published a new package meteor-packages-coverage that is a fork of meteor-coverage when it was covering files. At least we have a solid solution for packages coverage. And as you can see, meteor-coverage tests have been fixed on CI platforms Travis and Circle.ci. Everytime I upgrade Meteor there is a new bug, this time that was chai not found on server tests. Full bullshit ☕️ Just need to rewrite the README now ! ;) |
You've added the package |
There is no auto import on packages so everything imported is listed in the |
Just make sure you remove the files before building a version of this package. Even though these files are not imported, they might be published alongside with the rest of the files of the plugin. |
Ohh I didn't expect that... Thanks for the tips ! I will move to another repository |
Replaced the part of file instrumentation and source maps by the babel plugin
babel-plugin-istanbul
Description
This patch replaces the full implementation of instrumentation and source maps by the babel plugin
babel-plugin-istanbul
.This change also rendered the configuration for including and excluding files superfluous, which now can be configured in the babel-configuration (see: https://github.com/istanbuljs/babel-plugin-istanbul#ignoring-files)
Motivation and Context
There are several things we'll gain by using the babel plugin instead of a custom implementation:
How Has This Been Tested?
I had to remove most of the tests, since most of them were covering logic that's not needed anymore. I therefore have tested it manually - but only for code-coverage on a project - not when developing a plugin.
I just don't know if it's possible to use babel when running a test of a meteor-package ...
Types of changes