UNPKG

@helpscout/cyan

Version:

Cypress-like Testing for React + JSDOM

25 lines (22 loc) 547 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /** * @this {Promise} */ function finallyConstructor(callback) { var constructor = this.constructor; return this.then(function (value) { return constructor.resolve(callback()).then(function () { return value; }); }, function (reason) { return constructor.resolve(callback()).then(function () { return constructor.reject(reason); }); }); } var _default = finallyConstructor; exports.default = _default;