Closed ecowden closed 7 years ago
The weird callback thing is just ugly. Instead, consider something cleaner:
const pluto = require('pluto') const bind = pluto() const myInstance = {} pluto.bind('myInstance').toInstance(myInstance) // and other bindings const promise = pluto.get('myInstance') // get(...) must return a promise to support async promise.then( (result) => { t.is(result, myInstance) })
Fixed on one-oh-redesign branch.
one-oh-redesign
The weird callback thing is just ugly. Instead, consider something cleaner: