Skip to content

Commit 9effb60

Browse files
committed
more logs
1 parent 01eadbd commit 9effb60

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

packages/hub/src/utils/XetBlob.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ describe("XetBlob", () => {
133133
).then((res) => res.arrayBuffer());
134134

135135
console.log("xet", xetDownload.byteLength, "bridge", bridgeDownload.byteLength);
136-
expect(new Uint8Array(xetDownload)).toEqual(100_000);
136+
expect(new Uint8Array(xetDownload).length).toEqual(100_000);
137+
expect(new Uint8Array(xetDownload)).toEqual(new Uint8Array(bridgeDownload));
137138
}, 30_000);
138139

139140
it("should load text correctly when offset_into_range starts in a chunk further than the first", async () => {

packages/hub/src/utils/XetBlob.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,26 @@ export class XetBlob extends Blob {
364364
}
365365

366366
if (uncompressed.length) {
367-
console.log("yield", uncompressed.length, "bytes", result.value.length, "total read", totalBytesRead);
367+
console.log(
368+
"yield",
369+
uncompressed.length,
370+
"bytes",
371+
result.value.length,
372+
"total read",
373+
totalBytesRead,
374+
stored
375+
);
368376
totalBytesRead += uncompressed.length;
369377
yield stored ? uncompressed.slice() : uncompressed;
370-
console.log("yielded", uncompressed.length, "bytes", result.value.length, "total read", totalBytesRead);
378+
console.log(
379+
"yielded",
380+
uncompressed.length,
381+
"bytes",
382+
result.value.length,
383+
"total read",
384+
totalBytesRead,
385+
stored
386+
);
371387
}
372388
}
373389

0 commit comments

Comments
 (0)