tcompare
Version:
A comprehensive comparison library, for use in test frameworks
20 lines • 695 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MatchStrict = void 0;
const match_js_1 = require("./match.js");
/**
* Identical to {@link tcompare!match.Match}, *except* in the case of two
* simple types. If the value loosely equals the expected pattern, but is not
* strictly equal, then the test returns false.
*/
class MatchStrict extends match_js_1.Match {
test() {
// equal on type coercion, but not equal strictly.
if (this.expect == this.object && this.expect !== this.object) {
return false;
}
return super.test();
}
}
exports.MatchStrict = MatchStrict;
//# sourceMappingURL=match-strict.js.map