weird error when running test with jest
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18.9k
- Forks
- 1.6k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Report
- I have searched existing issues and this is not a duplicate
Issues and Steps to Reproduce
failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): BufferSource argument is empty
at v (../../node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js:63:371)
console.warn
Aborted(CompileError: WebAssembly.instantiate(): BufferSource argument is empty)
at v (../../node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js:13:60)
at x (../../node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js:63:418)
When running a test in our backend, it is getting this error on yoga-layout
├─┬ @react-pdf/renderer 4.1.6
│ └─┬ @react-pdf/layout 4.2.0
│ └── yoga-layout 3.2.1
Expected Behavior
it should not error
Actual Behavior
it is breaking
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Jest failure with the yoga-layout 3.2.1 dependency shown through @react-pdf/renderer, then inspect the referenced yoga-wasm-base64-esm.js path and the test setup. Done means the WebAssembly module no longer receives an empty buffer and the backend test runs without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wasm
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100