miter
Version:
A typescript web framework based on ExpressJs based loosely on SailsJs
16 lines • 621 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const chai_1 = require("chai");
const sinonChai = require("sinon-chai");
chai_1.use(sinonChai);
const wrap_callback_1 = require("../wrap-callback");
describe('util/wrapCallback', () => {
it('should invoke the callback function when the promise is resolved', (done) => {
let delay = (millis) => new Promise((resolve, reject) => {
setTimeout(resolve, millis);
});
let callbackFn = wrap_callback_1.wrapCallback(delay);
callbackFn(10, done);
});
});
//# sourceMappingURL=wrap-callback.spec.js.map