WME/aufgabe5/node_modules/csvtojson/.ts-node/46be5da2105bfdf13e8db086405c89f751746b6e7f1dbb5a5600bad96af1b73b/076e406715b1c0068ea4fa4d4891782b06ed868641caf40c0e9d7ff16f490303.js

223 lines
No EOL
27 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var src_1 = __importDefault(require("../src"));
var assert = require("assert");
var fs = require("fs");
var sinon_1 = require("sinon");
var sb = sinon_1.sandbox.create();
describe("testCSVConverter3", function () {
afterEach(function () {
sb.restore();
});
it("should parse large csv file with UTF-8 without spliting characters", function (done) {
var testData = __dirname + "/data/large-utf8.csv";
var rs = fs.createReadStream(testData);
var csvConverter = src_1.default({});
var count = 0;
csvConverter.preRawData(function (csvRawData) {
assert(csvRawData.charCodeAt(0) < 2000);
return csvRawData;
});
csvConverter.on("data", function () {
count++;
});
csvConverter.then(function () {
assert(count === 5290);
done();
});
rs.pipe(csvConverter);
});
it("should setup customise type convert function", function (done) {
src_1.default({
checkType: true,
colParser: {
"column1": "string",
"column5": function (item, head, resultRow, row, i) {
assert.equal(item, '{"hello":"world"}');
assert.equal(head, "column5"),
assert(resultRow);
assert(row);
assert.equal(i, 5);
return "hello world";
}
}
})
.fromFile(__dirname + "/data/dataWithType")
.subscribe(function (json) {
assert.equal(typeof json.column1, "string");
assert.equal(json.column5, "hello world");
assert.strictEqual(json["name#!"], false);
assert.strictEqual(json["column9"], true);
})
.on('done', function () {
done();
});
});
it("should accept pipe as quote", function (done) {
src_1.default({
quote: "|",
output: "csv"
})
.fromFile(__dirname + "/data/pipeAsQuote")
.subscribe(function (csv) {
assert.equal(csv[2], "blahhh, blah");
})
.on('done', function () {
done();
});
});
it("emit file not exists error when try to open a non-exists file", function () {
var called = false;
var cb = sb.spy(function (err) {
assert(err.toString().indexOf("File does not exist") > -1);
});
return src_1.default()
.fromFile("somefile")
.subscribe(function (csv) {
})
.on("error", cb)
.then(function () {
assert(false);
}, function (err) {
assert.equal(cb.callCount, 1);
});
});
it("should include column that is both included and excluded", function () {
return src_1.default({
includeColumns: /b/,
ignoreColumns: /a|b/
})
.fromString("a,b,c\n1,2,3\n4,5,6")
.subscribe(function (d) {
assert(d.b);
assert(!d.a);
});
});
it("should allow async preLine hook", function () {
return src_1.default()
.preFileLine(function (line) {
return new Promise(function (resolve, reject) {
setTimeout(function () {
resolve(line + "changed");
}, 20);
});
})
.fromString("a,b\n1,2")
.subscribe(function (d) {
assert(d.bchanged);
assert.equal(d.bchanged, "2changed");
});
});
it("should allow async subscribe function", function () {
return src_1.default({ trim: true })
.fromString("a,b,c\n 1,2,3\n 4,5,6")
.subscribe(function (d) {
return new Promise(function (resolve, reject) {
setTimeout(function () {
d.a = 10;
resolve();
}, 20);
});
})
.then(function (d) {
assert.equal(d[0].a, 10);
assert.equal(d[1].a, 10);
});
});
it("should propagate value to next then", function () {
return src_1.default({ trim: true })
.fromString("a,b,c\n 1,2,3\n 4,5,6")
.then(undefined, undefined)
.then(function (d) {
assert.equal(d.length, 2);
assert.equal(d[0].a, "1");
});
});
it("should propagate error to next then", function () {
return src_1.default({ trim: true })
.fromFile(__dirname + "/data/dataWithUnclosedQuotes")
.then(undefined, undefined)
.then(function () {
assert(false);
}, function (err) {
assert(err);
assert.equal(err.err, "unclosed_quote");
});
});
it("should fallback to text is number can not be parsed", function () {
return src_1.default({
colParser: {
"a": "number"
}
})
.fromString("a,b,c\n 1,2,3\n fefe,5,6")
.then(function (d) {
assert.strictEqual(d[0].a, 1);
assert.equal(d[1].a, "fefe");
});
});
it("should omit a column", function () {
return src_1.default({
colParser: {
"a": "omit"
}
})
.fromString("a,b,c\n 1,2,3\n fefe,5,6")
.then(function (d) {
assert.strictEqual(d[0].a, undefined);
assert.equal(d[1].a, undefined);
});
});
it("could turn off quote and should trim even quote is turned off", function () {
return src_1.default({
quote: "off",
trim: true
})
.fromString("a,b,c\n \"1\",\"2\",\"3\"\n \"fefe,5\",6")
.then(function (d) {
assert.equal(d[0].a, '"1"');
assert.equal(d[0].b, '"2"');
assert.equal(d[1].a, '"fefe');
assert.equal(d[1].b, '5"');
});
});
it("should allow ignoreEmpty with checkColumn", function () {
return src_1.default({
checkColumn: true,
ignoreEmpty: true
})
.fromString("date,altitude,airtime\n 2016-07-08,2000,23\n \n 2016-07-09,3000,43")
.then(function (data) {
}, function (err) {
console.log(err);
assert(!err);
});
});
it("should allow quotes without content", function () {
var data = "a|^^|^b^";
return src_1.default({
delimiter: '|',
quote: '^',
noheader: true,
})
.fromString(data)
.then(function (jsonObj) {
assert.equal(jsonObj[0].field2, "");
});
});
it("should parse header with quotes correctly", function () {
var testData = __dirname + "/data/csvWithUnclosedHeader";
return src_1.default({
headers: ["exam_date", "sample_no", "status", "sample_type", "patient_id", "last_name", "first_name", "gender_of_patient", "patient_birth_date", "patient_note", "patient_department", "accession_number", "sample_site", "physician", "operator", "department", "note", "test_order_code", "draw_time", "approval_status", "approval_time", "report_layout", "patient_account_number", "none_1", "errors_detected_during_measurement", "age", "error_code_01", "weight", "error_code_02", "height", "error_code_03", "hcg_beta_p", "error_code_04", "troponin_i_p", "error_code_05", "ck_mb_p", "error_code_06", "d_dimer_p", "error_code_07", "hscrp_p", "error_code_08", "myoglobin_p", "error_code_09", "nt_probnp", "error_code_10", "crp", "error_code_11", "bnp", "error_code_12", "tnt", "error_code_13", "demo_p", "error_code_14", "pct", "error_code_15"]
})
.fromFile(testData)
.then(function (d) {
assert.equal(d.length, 2);
assert.equal(d[0].sample_no, "12669");
});
});
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL2t4aWFuZy93b3JrL3Byb2plY3RzL2NzdjJqc29uL3Rlc3QvdGVzdENTVkNvbnZlcnRlcjMudHMiLCJzb3VyY2VzIjpbIi9Vc2Vycy9reGlhbmcvd29yay9wcm9qZWN0cy9jc3YyanNvbi90ZXN0L3Rlc3R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