Ember test only runs jshint stuff


#1

For some strange reason when I run ember test from the command line or /test from the browser, none of my tests are being run only jshint stuff.

What am I doing wrong?


#2

Are you getting any errors in the js console?


#3

This is what I see:

JSHint - initializers: global failure (1, 0, 1)Rerun2 ms
Uncaught TypeError: undefined is not a function
Source: http://localhost:4200/assets/hal-client.js:3084

Looking at the source line number, it seems that ember_qunit is not defined for some reason.

define('hal-client/tests/integration/about-page-test', ['ember', 'hal-client/tests/helpers/start-app', 'ember-qunit'], function (Ember, startApp, ember_qunit) {

  'use strict';

  var App;

  ember_qunit.module("Integration: About Page", { // <-- line 3084
    setup: function () {
      App = startApp['default']();
    },
    teardown: function () {
      Ember['default'].run(App, "destroy");
    }
  });

#4

Did you update ember-cli recently? I think there have been some changes to the Qunit API.

If you run ember init and hit d to diff each file, n to leave as is, you may see where the changes should be, in bower.json, package.json and the test bootstrapping files.


#5

Yes I recently updated to the latest version. Noticed also that all of the jsbin test examples on the website are also broken.


#6

odd maybe this is related to issues I have been having where I tried to start writing acceptance tests and can’t get them working even running the generated ones ember cli generator provides just completely hangs up when they start running and all they are doing is visiting a route andThen checking the current route


#7

Try removing the dash in the file name. Call it aboutpage-test.js.

And if you find where in the tangled mass of ember-cli this is happening, do let me know. You might also try specifying src_files of tests/unit/**/*-test.js in testem.json and see if that picks up the dasherized names.