@johanblumenberg/ts-mockito
Version:
Mocking library for TypeScript
33 lines • 1.46 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.IsAfterOrEqualMatcher = void 0;
var DateMatcher_1 = require("./DateMatcher");
var IsAfterOrEqualMatcher = (function (_super) {
__extends(IsAfterOrEqualMatcher, _super);
function IsAfterOrEqualMatcher() {
return _super !== null && _super.apply(this, arguments) || this;
}
IsAfterOrEqualMatcher.prototype.match = function (value) {
value = new Date(value);
return DateMatcher_1.isValidDate(value) && value.getTime() >= this.date.getTime();
};
IsAfterOrEqualMatcher.prototype.toString = function () {
return "isAfterOrEqual(" + this.date.toISOString() + ")";
};
return IsAfterOrEqualMatcher;
}(DateMatcher_1.DateMatcher));
exports.IsAfterOrEqualMatcher = IsAfterOrEqualMatcher;
//# sourceMappingURL=IsAfterOrEqualMatcher.js.map