Created
July 20, 2012 15:59
-
-
Save gmurphey/3151540 to your computer and use it in GitHub Desktop.
Spy Tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Windows = { | |
method1: function () { } | |
}; | |
(function ($) { | |
module('windows-api', { | |
setup: function () { | |
sinon.spy(Windows, 'method1'); | |
}, | |
teardown: function () { | |
Windows.method1.restore(); | |
} | |
}); | |
test('do something on our end that uses the Windows API', function () { | |
// do something with the Windows API | |
sinon.assert.calledOnce(Windows.method1); | |
}); | |
}) (jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment