Add webpack to modules list?
After a brief discussion via twitter with @MylesBorins, he offered we could work together on getting webpack added to the module lists.
We also have some important supporting packages but ill list all and their testing commands and we can work from there:
| repo | command to run tests | recommended test machine (if relevant) |
|---|---|---|
| webpack/webpack | npm link && npm link webpack && npm t |
any |
| webpack/enhanced-resolve | npm test |
any |
| webpack/watchpack | npm test |
non-mac (very flaky tests on mac) |
| webpack/loader-runner | npm test |
any |
| webpack/tapable | npm test |
any |
| webpack/webpack-sources | npm test |
any |
| webpack/memory-fs | npm test |
any |
All of the non webpack/webpack repos are less important but they are just some more on the list to ensure legit coverage.
We are working to create a similar CITGM for our own plugin loader ecosystem so we can smoke test individual packages as well.
Let me know about thoughts. I will submit a PR with a bit of direction. Thanks!
@MylesBorins how are we going to add this if we can't pass in custom test commands?
We could create an alias command for webpack/webpack if needed. Let me know if I can help facilitate.
@TheLarkInn the way that citgm currently works is that it runs npm install and then npm test on the module.
I haven't looked at that part of the code yet, is there scope to add a pre hook?
Not at the moment, we are trying to move away from all custom scripts
@TheLarkInn official pre hooks will be called. Essentially we shell out npm install && npm test
Oh so could I technically set that linking in a postinstall and that would be fine?
@TheLarkInn that should work, and it should be sandboxed to out install... that being said I think it is a bit of an anti-pattern to have to modify the environment of the machine to run the test suite. I can dig into the webpack test suite a little bit and see if there is a way to do this without changing the environment.
@MylesBorins That would be greatly appreciated. I can't recall specifically the reasoning behind needing to npm link && npm link webpack locally for that test suite so if we can remove it ourselves from our infra, that would be even better.
@TheLarkInn can you not just change your test script in package.json from
"test": "mocha test/*.test.js --harmony --check-leaks", ==>
"test": "npm link && npm link webpack && mocha test/*.test.js --harmony --check-leaks",
Seems to be working for me and then it could be implemented into citgm easily
ping @TheLarkInn @MylesBorins is my solution going to work?