0

I'm creating a JHipster Blueprint and I would like to add unit tests in order to have reliable tests and a short feedback loop.

However neither the official showcase blueprint nor the JHipster blueprint generator have unit tests using mocha or yeoman-test framework (I think they rely on Travis, but it's more integration tests).

Is there's an easy way to test a blueprint?

I believe the difficulty is that blueprints highly depends on JHipster sub-generator they overrides, so that means the tests should also run the JHipster sub-generator in the context of the blueprint.

  • I assume it would be similar to the main `generator-jhipster` tests (I haven't tried blueprints so can't say for sure). https://github.com/jhipster/generator-jhipster/tree/master/test – Jon Ruddell Sep 10 '18 at 15:45
  • Unfortunately, I myself haven't got around to doing unit tests for the samples, its in my todo list. It should be similar to the generator but there might be hiccups due to the composition part. I suggest you just copy the test from main generator and see how it goes – Deepu Sep 11 '18 at 15:34
  • FYI I'm working on some jhipster core changes to easy blueprint testing. – Aurélien Mino Sep 17 '18 at 21:42

0 Answers0