0

I am trying to run chutzpah with Qunit requirejs and sinon. I have defined the chutzpah json like this:

 {
    "Framework": "qunit",
    "TestHarnessReferenceMode": "AMD",
    "TestHarnessLocationMode": "SettingsFileAdjacent",
    "References": [

          { "Path": "Scripts/jquery-2.1.1.js" },
          { "Path": "Scripts/sinon-1.9.1.js" },
          { "Path": "Scripts/require.js" }
      ],
     "Tests": [
          { "Path": "tests" }
      ]
}

the unit test:

 define(['base/core', 'base/myService'],
       function (core, myService) {

       module("chutzpah test");
       test("will return correct version from core", function() {
               var version = core.version;
               equal(version, 8);
        });

       test("sinon checking", function() {
            sinon.stub(myService, 'getMessage').returns('fake value');

             var result = core.returnMessage();

             equal(result, 'fake value');
        });
   });

when I run the test, I am always getting the following error:

   ------ Discover test started ------
   Error: Timeout occured when executing test file
   While Running:d:\tdd javascript\unittestjavascript\unittestjavascript\tests\base\mytests.js

   ========== Discover test finished: 0 found (0:00:11.1241566) ==========

I have tried to find why it's doesn't work, but had no success.
Does any one have any idea what I am doing wrong?

Atur
  • 1,712
  • 6
  • 32
  • 42
Haim_t
  • 37
  • 5
  • If it's the same problem as http://stackoverflow.com/questions/24071655 try looking at your reference paths. – demoncodemonkey Jul 24 '14 at 07:27
  • possible duplicate of [Visual Studio's Test Runner with Chutzpah won't recognize QUnit tests when using both Requirejs and knockoutjs](http://stackoverflow.com/questions/24071655/visual-studios-test-runner-with-chutzpah-wont-recognize-qunit-tests-when-using) – demoncodemonkey Jul 24 '14 at 07:31
  • If you run Chutzpah with the /openinbrowser command you can see what how it created and test harness and this often helps determine what is wrong. – Matthew Manela Mar 07 '15 at 22:44

0 Answers0