You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 18, 2018. It is now read-only.
So the best way here would be to refactor the methods and let _writeAsync() return the promise, and not let it call a callback. That way you can better evaluate the result of the write operation, directly in the test and without all those workarounds.
whimboo, I'm asking here for permission to rewrite Logger to use Promises. So at least Logger.stop and Logger.log would change. And all logging related tests, of course.
Testing with Promises isn't too trivial, but not too hard. :) See addon-sdk/test/test-promise.js for example!
Ok, I tried it, and doesn't work for me. Only _writeAsync should be asynchronous.
So I'm going to do something with the callbacks to make it usable again.