|
15 | 15 | * These tests assert that behavior at the `kychonImageHtml` boundary |
16 | 16 | * (`lqipDataUri` is internal to the module and not exported separately). |
17 | 17 | */ |
18 | | -import { describe, expect, it } from 'vitest'; |
| 18 | + |
19 | 19 | import type { AssetRef } from '@run402/astro'; |
| 20 | +import { describe, expect, it } from 'vitest'; |
20 | 21 | import { kychonImageHtml } from '../../src/lib/kychon-image'; |
21 | 22 |
|
22 | 23 | // A well-formed PNG data URL that's deliberately distinct from anything |
23 | 24 | // the blurhash decoder would actually produce — lets the assertion confirm |
24 | 25 | // the value came from the AssetRef field, not from a decode. |
25 | | -const SENTINEL_DATA_URL = |
26 | | - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAQElEQVRFAEQOPYHa0eTL'; |
| 26 | +const SENTINEL_DATA_URL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAQElEQVRFAEQOPYHa0eTL'; |
27 | 27 |
|
28 | 28 | // A real-shape blurhash string the decoder can process. Used to exercise |
29 | 29 | // the fallback path; the test asserts on the data-URL prefix, not the |
@@ -79,8 +79,7 @@ describe('kychon-image v1.54 blurhash_data_url fast path', () => { |
79 | 79 | // `blurhash_data_url` is a v1.54 field not yet in @run402/astro@0.2.5's |
80 | 80 | // AssetRef type; cast locally to attach it. `blurhash` is also set to |
81 | 81 | // prove the fast path WINS over the fallback when both are available. |
82 | | - (ref as AssetRef & { blurhash_data_url?: string | null }).blurhash_data_url = |
83 | | - SENTINEL_DATA_URL; |
| 82 | + (ref as AssetRef & { blurhash_data_url?: string | null }).blurhash_data_url = SENTINEL_DATA_URL; |
84 | 83 | ref.blurhash = SAMPLE_BLURHASH; |
85 | 84 |
|
86 | 85 | const html = kychonImageHtml(ref, 'hero', { sizes: '100vw' }); |
|
0 commit comments