Closed RichardWright closed 8 years ago
I've got this code working in the browser, but in node..still bust.
@RichardWright, thanks for issue. Can you try to handle promise catch?
it('Load the active tab', function() {
var dummyTabs = [];
dummyTabs.push({url: 'testurl1'});
dummyTabs.push({url: 'testurl2'});
dummyTabs.push({url: 'testurl3'});
chrome.tabs.query.withArgs({active: true, currentWindow:true}).yields(dummyTabs);
var cookieFlip = new CookieFlip();
return cookieFlip.getCurrentTab()
.then(function(data) {
console.log('verify the new promise');
expect(data.url).to.equal('testurl');
})
.catch(err => console.log(err));
});
I can't get the sinon-chrome stubs to return when using promises. Any ideas??
The test itself:
Code to test: