Skip to content

Commit 7ae7778

Browse files
Add test case to ensure debuginfo is preserved
1 parent bbbf74e commit 7ae7778

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/npm-packages/ruby-wasm-wasi/test/package.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,13 @@ describe("Packaging validation", () => {
4343
vm.eval(`require "English"`);
4444
}
4545
});
46+
47+
test("ruby.debug+stdlib.wasm has debug info", async () => {
48+
const binary = await fs.readFile(
49+
path.join(__dirname, `./../dist/ruby.debug+stdlib.wasm`)
50+
);
51+
const mod = await WebAssembly.compile(binary.buffer);
52+
const nameSections = WebAssembly.Module.customSections(mod, "name");
53+
expect(nameSections.length).toBe(1);
54+
})
4655
});

0 commit comments

Comments
 (0)