0
votes

Up until recently I was including the file...

https://raw.githubusercontent.com/rwjblue/ember-qunit-builds/master/dist/globals/main.js

...in a 'TestRunner' page which I would open to run all of my Ember unit tests. All was great.

A few days ago, that file disappeared from github, so I started searching for the new way get my unit tests (e.g. moduleForComponent tests) running.

I first tried to simply include the ember-qunit.js file from the ember-qunit-builds repo, but errors like could not find module 'ember' came back.

Am I correct in saying that ember-qunit somehow depends on ember-test-helpers? I'm a bit lost as to which references I should be including before my test code...I have a feeling that I'm missing something related to ES6-style modules (export/import etc) with which I have little experience.

Could somebody perhaps point me in the right direction here? What should I be including on my 'TestRunner.html' page to get the 'moduleForComponent'-style tests happening again?

Note: I'm in a .NET environment where I understand that the frequently-mentioned tools for 'installing' this stuff (like Bower/npm) are not really available (are these a necessity for getting this to work?).

1

1 Answers

1
votes

I'm not really sure where your problem is, but I can paste you relevant parts of my index.html (I'm using Ember App Kit here):

<!-- @if tests=true -->
<script src="/vendor/ember-shim.js"></script>
<link rel="stylesheet" href="/vendor/qunit/qunit/qunit.css">
<script src="/vendor/qunit/qunit/qunit.js"></script>
<script src="/vendor/qunit-shim.js"></script>
<script src="/vendor/ember-qunit/dist/named-amd/main.js"></script>
<div id="qunit"></div>
<!-- @endif -->

and

<!-- @if tests=true -->
<div id="qunit-fixture"></div>
<script src="/tests/tests.js"></script>
<script src="/tests/test-helper.js"></script>
<script src="/tests/test-loader.js"></script>
<script src="/testem.js"></script>
<!-- @endif -->

If you're looking particularly for the dist/globals/main.js file, then you can always go to github and select an older tag (not master), then go to the file's raw version. Here's the link to the 0.1.8 version:

https://raw.githubusercontent.com/rwjblue/ember-qunit/v0.1.8/dist/globals/main.js

If you want to stay up-to-date, use this repo: https://github.com/rwjblue/ember-qunit-builds Does this provide any help?