What's the difference between ember-cli-qunit and ember-qunit

I’m trying to upgrade my test setup to as far as I can get it without upgrading ember itself and it’s the first time I’ve looked at all these addons. It looks like we’re installing ember-cli-qunit, but its code seems to just re-export ember-qunit. Is there something else I’m not understanding? Can I just use ember-qunit directly?

tldr; Yes, you can just use ember-qunit directly, and future versions of ember-cli will update the default application blueprint in the same way.


Waaaaaay back when these packages were createdember-qunit was not an ember-cli addon originally and instead provided globals builds, and ember-cli-qunit brought it into ember-cli apps in a nice way.

As the testing infrastructure was updated for the various testing RFC’s that were implemented leading up to Ember 3.0, we migrated ember-qunit to be a normal ember-cli addon (since Ember itself dropped support in 3.0 for consumption outside of ember-cli). At that point there was no longer an important distinction between ember-cli-qunit and ember-qunit, and all of the actual code was moved into ember-qunit directly.

During that transition, we decided to leave ember-cli-qunit as the primary dependency in apps to help reduce confusing churn in the blueprints (this was also before the popularity of ember-cli-update, which makes this whole process seamless).

I believe that we are now to a point where we should reconsider that decision (Migrate from ember-cli-qunit to ember-qunit. by rwjblue · Pull Request #7365 · ember-cli/ember-cli · GitHub is the PR from way back when we discussed it last), thanks for bringing this up!

3 Likes

Please be careful if you’re using ember-cli-template-lint and you use ember-qunit instead of ember-cli-qunit, there will be a warning, see: Test Generators Warning · Issue #289 · ember-template-lint/ember-cli-template-lint · GitHub

Thanks for pointing that out @nightire! It is a bug in ember-cli-template-lint, I submitted Allow ember-qunit and ember-mocha directly. by rwjblue · Pull Request #344 · ember-template-lint/ember-cli-template-lint · GitHub to address…