neutrinojs / neutrino

Create and build modern JavaScript projects with zero initial configuration.
https://neutrinojs.org
Mozilla Public License 2.0
3.94k stars 213 forks source link

How to test presets? #854

Closed Maxim-Filimonov closed 6 years ago

Maxim-Filimonov commented 6 years ago

Hi, I'm trying to create a new preset and cannot find good example of how to test one. Is there a good example of integration tests with neutrino to check that created config is good?

eliperelman commented 6 years ago

See https://github.com/mozilla-neutrino/neutrino-dev/issues/285#issuecomment-311201082. Each middleware in this project creates an instance of the Neutrino API, and attempts to require the middleware, have Neutrino use it, and then output a valid webpack configuration. Anything more than that would require doing something like create-project does, with integration tests:

https://github.com/mozilla-neutrino/neutrino-dev/tree/master/packages/create-project/test

Maxim-Filimonov commented 6 years ago

Hm... sounds like a missing testing guide in the docs, PR ?

eliperelman commented 6 years ago

We are always happy to accept any PR. 😄