test(wasm): accept a zstd read when the build has the filter
cargo test --workspace unifies clawhdf5-format/zstd on (another member enables it), so the native interop test read the Zstd dataset that the wasm build refuses. The fixture now records its values plus the error the wasm build must give; the native test accepts either, the Node test of the real wasm package still requires the error. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
@@ -69,6 +69,12 @@ for (const [name, exp] of Object.entries(expected)) {
|
||||
for (const [path, want] of Object.entries(exp.datasets)) {
|
||||
const ctx = `${name}:${path}`;
|
||||
eq(file.kind(path), "dataset", `${ctx} kind`);
|
||||
if (want.unavailable) {
|
||||
// The wasm build has no zstd (it links C): a clear error, no data.
|
||||
assert.throws(() => file.read(path), (e) => e.message.includes(want.unavailable), ctx);
|
||||
checks++;
|
||||
continue;
|
||||
}
|
||||
const info = file.info(path);
|
||||
eq([...info.shape, ...info.elementShape], want.shape, `${ctx} info shape`);
|
||||
const r = file.read(path);
|
||||
|
||||
Reference in New Issue
Block a user