alsatian
Version:
TypeScript and JavaScript testing framework for beautiful and readable tests
14 lines • 749 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const stringification_1 = require("../stringification");
const object_matcher_1 = require("./object-matcher");
class ContainerMatcher extends object_matcher_1.ObjectMatcher {
toContain(expectedContent) {
this._registerMatcher(this.actualValue.indexOf(expectedContent) > -1 === this.shouldMatch, `Expected ${stringification_1.stringify(this.actualValue)} ${!this.shouldMatch ? "not " : ""}` + `to contain ${stringification_1.stringify(expectedContent)}.`, expectedContent, {
actualContainer: this.actualValue,
expectedContent,
});
}
}
exports.ContainerMatcher = ContainerMatcher;
//# sourceMappingURL=container-matcher.js.map
;