UNPKG

stryker

Version:
22 lines 784 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var esprima_1 = require("esprima"); /** * Represents a mutator which can remove the content of a BlockStatement. */ var BlockStatementMutator = /** @class */ (function () { function BlockStatementMutator() { this.name = 'BlockStatement'; this.type = esprima_1.Syntax.BlockStatement; } BlockStatementMutator.prototype.applyMutations = function (node, copy) { if (node.type === this.type && node.body.length > 0) { var mutatedNode = copy(node); mutatedNode.body = []; return mutatedNode; } }; return BlockStatementMutator; }()); exports.default = BlockStatementMutator; //# sourceMappingURL=BlockStatementMutator.js.map