Skip to content

Commit 51ef023

Browse files
authored
Fix webBlob test (use LFS file as example instead of Xet file) (#1230)
CI currently fails with: ``` packages/hub test:browser: ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯ packages/hub test:browser: FAIL src/utils/WebBlob.spec.ts > WebBlob > should lazy load a LFS file hosted on Hugging Face packages/hub test:browser: Error: Test timed out in 5000ms. packages/hub test:browser: If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout". packages/hub test:browser: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ ``` PR expectation: CI is green. See #1230 (comment) and #1230 (comment) for explanation.
1 parent 80cf756 commit 51ef023

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ describe("WebBlob", () => {
4949
});
5050

5151
it("should lazy load a LFS file hosted on Hugging Face", async () => {
52-
const stableDiffusionUrl =
53-
"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/unet/diffusion_pytorch_model.fp16.safetensors";
54-
const url = new URL(stableDiffusionUrl);
52+
const zephyrUrl =
53+
"https://huggingface.co/HuggingFaceH4/zephyr-7b-alpha/resolve/main/model-00001-of-00008.safetensors";
54+
const url = new URL(zephyrUrl);
5555
const webBlob = await WebBlob.create(url);
5656

57-
expect(webBlob.size).toBe(5_135_149_760);
57+
expect(webBlob.size).toBe(1_889_587_040);
5858
expect(webBlob).toBeInstanceOf(WebBlob);
5959
expect(webBlob).toMatchObject({ url });
6060
expect(await webBlob.slice(10, 22).text()).toBe("__metadata__");

0 commit comments

Comments
 (0)