0

QUnit + JSTestDriver: No tests found

I'm not able to get QUnit working with the JSTestDriver plugin working in PHPStorm.  I have followed the help and guides online, but I will always get the error:

No tests found. Please check 'test:' section of the configuration file

Empty test suite
My jstestdriver.jstd configuration:

My jstestdriver.jstd file

load:
- test/libs/equiv.js
- test/libs/QUnitAdapter.js
- bower_components/jquery/dist/jquery.js
- bower_components/qunit/qunit/qunit.js
- src/*.js

test:
- test/*.js

My test file:

(function() {
  (function($) {

    /*
         ======== A Handy Little QUnit Reference ========
         http://api.qunitjs.com/
    
         Test methods:
         module(name, {[setup][ ,teardown]})
         test(name, callback)
         expect(numberOfAssertions)
         stop(increment)
         start(decrement)
         Test assertions:
         ok(value, [message])
         equal(actual, expected, [message])
         notEqual(actual, expected, [message])
         deepEqual(actual, expected, [message])
         notDeepEqual(actual, expected, [message])
         strictEqual(actual, expected, [message])
         notStrictEqual(actual, expected, [message])
         throws(block, [expected], [message])
     */
    "use strict";
    module("jQuery#hash-tabs", {
      setup: function() {
        return this.elems = $("#qunit-fixture").children();
      }
    });
    test("is chainable", function() {
      expect(1);
      return strictEqual(this.elems.hash - tabs(), this.elems, "should be chainable");
    });
    test("is hash-tabs", function() {
      expect(1);
      return strictEqual(this.elems.hash - tabs().text(), "hash-tabs0hash-tabs1hash-tabs2", "should be hash-tabs");
    });
    module("jQuery.hash-tabs");
    test("is hash-tabs", function() {
      expect(2);
      strictEqual($.hash - tabs(), "hash-tabs.", "should be hash-tabs");
      return strictEqual($.hash - tabs({
        punctuation: "!"
      }), "hash-tabs!", "should be thoroughly hash-tabs");
    });
    module(":hash-tabs selector", {
      setup: function() {
        return this.elems = $("#qunit-fixture").children();
      }
    });
    return test("is hash-tabs", function() {
      expect(1);
      return deepEqual(this.elems.filter(":hash-tabs").get(), this.elems.last().get(), "knows hash-tabs when it sees it");
    });
  })(jQuery);

}).call(this);

Tests will run fine using the web version and index.html file which ships with QUnit.  But tests cannot be found using the jstestdriver plugin.

Any help would be appreciated

2 comments

Please sign in to leave a comment.