2 Object.defineProperty(exports, "__esModule", { value: true });
3 exports.batchedSingleLineTests = void 0;
4 function batchedSingleLineTests(options) {
5 // eslint counts lines from 1
6 const lineOffset = options.code.startsWith('\n') ? 2 : 1;
7 const output = 'output' in options && options.output
8 ? options.output.trim().split('\n')
14 const lineNum = i + lineOffset;
15 const errors = 'errors' in options
16 ? options.errors.filter(e => e.line === lineNum)
18 const returnVal = Object.assign(Object.assign({}, options), { code, errors: errors.map(e => (Object.assign(Object.assign({}, e), { line: 1 }))) });
19 if (output === null || output === void 0 ? void 0 : output[i]) {
20 return Object.assign(Object.assign({}, returnVal), { output: output[i] });
25 exports.batchedSingleLineTests = batchedSingleLineTests;
26 //# sourceMappingURL=batchedSingleLineTests.js.map