sinon stub with es6-promisified object
问题 Ok my setup is as follows: Using node 6.2, es6-promisify, sinon, sinon-as-promised, and babel to transpile support for es6 import/export. My code under test looks something like this: const client = restify.createJsonClient({ url: 'http://www.example.com' }); export let get = promisify(client.get, {thisArg: client, multiArgs: true}); export default function* () { yield get('/some/path'); } And then in my test file I have something like this: import * as m from mymodule; it('should fail',