mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 08:12:52 +00:00
style: apply prettier across the tree
One-shot prettier pass so the new format:check gate starts from a clean baseline. Formatting only — no behaviour change. Generator-owned and vendored artifacts stay untouched via .prettierignore.
This commit is contained in:
1 parent
b3fea2ef59
commit
1f4ba5939d
1000 files changed
+12130
-8385
No files matched your search
@@ -17,8 +17,7 @@ function parse(rows: string[]) {
|
||||
|
||||
describe("splitCsvRows", () => {
|
||||
it("handles CRLF, quoted commas, escaped quotes, and a BOM", () => {
|
||||
const csv =
|
||||
"a,b,c\r\n1,\"x,y\",\"he said \"\"hi\"\"\"\r\n2,plain,z\r\n";
|
||||
const csv = 'a,b,c\r\n1,"x,y","he said ""hi"""\r\n2,plain,z\r\n';
|
||||
const grid = splitCsvRows(csv);
|
||||
expect(grid).toEqual([
|
||||
["a", "b", "c"],
|
||||
@@ -51,9 +50,10 @@ describe("parseCsvMeasurements — header validation", () => {
|
||||
|
||||
it("accepts columns in any order", () => {
|
||||
const out = parseCsvMeasurements(
|
||||
["unit,measuredAt,type,value", "kg,2026-05-01T08:00:00Z,WEIGHT,80.5"].join(
|
||||
"\n",
|
||||
),
|
||||
[
|
||||
"unit,measuredAt,type,value",
|
||||
"kg,2026-05-01T08:00:00Z,WEIGHT,80.5",
|
||||
].join("\n"),
|
||||
{ now: NOW },
|
||||
);
|
||||
expect(out.fatal).toBeUndefined();
|
||||
|
||||
@@ -21,7 +21,7 @@ function buildMinimalZip(filename: string, payload: Buffer): Buffer {
|
||||
for (let n = 0; n < 256; n++) {
|
||||
c = n;
|
||||
for (let k = 0; k < 8; k++) {
|
||||
c = (c & 1) ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
||||
c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
||||
}
|
||||
table[n] = c;
|
||||
}
|
||||
@@ -79,14 +79,7 @@ function buildMinimalZip(filename: string, payload: Buffer): Buffer {
|
||||
eocd.writeUInt32LE(30 + nameBuf.length + compressed.length, 16);
|
||||
eocd.writeUInt16LE(0, 20); // comment len
|
||||
|
||||
return Buffer.concat([
|
||||
localHeader,
|
||||
nameBuf,
|
||||
compressed,
|
||||
cdh,
|
||||
nameBuf,
|
||||
eocd,
|
||||
]);
|
||||
return Buffer.concat([localHeader, nameBuf, compressed, cdh, nameBuf, eocd]);
|
||||
}
|
||||
|
||||
describe("readCentralDirectory", () => {
|
||||
|
||||
Reference in new issue
Block a user