This bug was not caught due to a separate bug in the test logic, which is also fixed in this commit.
}
i++;
}
- this.#columns.filter(c => c.index !== null); // Drop columns provided in the headers input but not in the CSV
+ this.#columns = this.#columns.filter(c => c.index !== null); // Drop columns provided in the headers input but not in the CSV
this.#firstChunk = false;
return;
}
return new WritableStream({
write(chunk) {
const row = JSON.parse(chunk);
+ deepStrictEqual(row.length, csv[i].length);
for (let j = 0; j < csv[i].length; j++) {
deepStrictEqual(row[j], csv[i][j]);
}