title: bbb qunit testing
body: <p>I use backbone boilerplate for my project and have a problems with testing it. For tests I use QUnit. For example, test collection:</p>
  
  <p>tests/index.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  
  ...qunit.js, qunit.css, other libraries...
  
  &lt;script data-main="../../app/config" src="../../vendor/js/libs/require.js"&gt;&lt;/script&gt;
  &lt;!-- Declare your test files to be run here --&gt;
  &lt;script&gt;
    QUnit.config.autostart = false;
    // Ensure you point to where your tests are, base directory is app/, which
    // is why ../test is necessary
    require({
      paths: {
        tests: "../test/qunit/tests"
      }
    }, [
  
      // Load the example tests, replace this and add your own tests
      // "tests/example",
  
      "tests/sites/collections"
  
    ], QUnit.start);
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>tests/sites/collections.js</p>
  
  <pre><code>define(['modules/sites'], function (Sites) {
    module("module sites collection", {
      setup: function () {
        this.collection = new Sites.Collection();
      }
    });
  
    test("URL of sites collection.", function () {
      expect(1);
      equal(this.collection.url, 'http://bbb-example.x:8001/sites');
    });
  });
  </code></pre>
  
  <p>my grunt.js file in the section test look this:</p>
  
  <pre><code>qunit: {
    all: ["test/qunit/*.html"]
  },
  </code></pre>
  
  <p>when I open browser window all ok, I see my test:</p>
  
  <pre><code>Tests completed in 385 milliseconds.
  1 assertions of 1 passed, 0 failed.
  </code></pre>
  
  <p>but when I try to run it in console, I see the strange error:</p>
  
  <pre><code>~/projects/JS-bbb-example$ bbb test
  Running "qunit:all" (qunit) task
  Testing index.html
  &lt;WARN&gt; PhantomJS timed out, possibly due to a missing QUnit start() call. Use --force to continue. &lt;/WARN&gt;
  
  Aborted due to warnings.
  &gt;&gt; 0 assertions passed (0ms)
  
  Done, but with warnings.
  </code></pre>
  
  <p>Maybe you know this problem and know how it can be resolve? Thanks for help.</p>