-
-
Save jchannon/83258bd7f144f0a294be to your computer and use it in GitHub Desktop.
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
module.exports = (function () { | |
var constructor = function (timer) { | |
console.log('hi'); | |
timer.Start(); | |
return 666; | |
} | |
return constructor; | |
})(); |
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 assert = require("assert") | |
var sinon = require('sinon'); | |
var mmsProcessor = require('../MMS/MMSProcessor.js'); | |
describe('MMSProcessor', function(){ | |
describe('DownloadFiles', function(){ | |
it('should start timer', function(){ | |
var myAPI = { Start: function () {} }; | |
var mock = sinon.mock(myAPI); | |
mock.expects("Start").once(); | |
mmsProcessor(mock); | |
mock.verify(); | |
}) | |
}) | |
}) | |
// when i runt the test i get TypeError: Object #<Object> has no method 'Start' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment