Quantcast
Channel: Chutzpah - A JavaScript Test Runner
Viewing all articles
Browse latest Browse all 1864

New Post: include sinon on my tests

$
0
0
this is a Here is a simple example of unit test i make
test("sinon checking", function() {
        sinon.stub(myService, 'getMessage').returns('abc');

        var result = core.returnMessage();

        equal(result, 'abc');
    });
and i get this message:
------ Test started: File: D:\TDD javascript\unitTestJavaScript\unitTestJavaScript\tests\base\mytests.js ------
Error: Timeout occured when executing test file
While Running:D:\TDD javascript\unitTestJavaScript\unitTestJavaScript\tests\base\mytests.js
========== Total Tests: 0 passed, 0 failed, 0 total ==========

the project build like this
base
  core.js
  myService.js
tests
  mytests.js
Scripts
    jquery-2.1.1.intellisense.js
    jquery-2.1.1.js
    jquery-2.1.1.min.js
    jquery-2.1.1.min.map
    require.js
    sinon-1.9.1.js
chutzpah.json
{
    "Framework": "qunit",
    "TestHarnessReferenceMode": "AMD",
    "TestHarnessLocationMode": "SettingsFileAdjacent",
    "References" : [
        {"Path" : "Scripts/require.js" },
        {"Path" : "Scripts/jquery-2.1.1.js" },
        {"Path" : "Scripts/sinon-1.9.1.js" }
    ]
}
i work on VS 2013

Viewing all articles
Browse latest Browse all 1864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>