acvetkov / sinon-chrome

Testing chrome extensions with Node.js
ISC License
435 stars 46 forks source link

Promises? #31

Closed RichardWright closed 8 years ago

RichardWright commented 8 years ago

Hi!

I'm going to rewrite a library I wrote using sinon-chrome. It will make the tests so much better! However I was also hoping to use your chrome promise library 'then-chrome' - Would that be possible?

acvetkov commented 8 years ago

@RichardWright hi! Did you mean, if you rewrite your app with then-chrome lib, sinon-chrome tests will works?

RichardWright commented 8 years ago

I should rephrase that - I was very tired when I wrote it.

I've written a chrome plugin and having seen a couple of libraries for converting the chrome api to promises, it seemed like a great time for a rewrite. I unit tested it with jasmine and I feel I can do much better with mocha and sinon.

I can see I am perhaps being stupid and that all I need to do is stub the promises returned from your chrome promises library.

acvetkov commented 8 years ago

@RichardWright Use sinon-chrome and then-chrome and you will be happy.