Skip to content

Files

Latest commit

e39741f · Feb 26, 2025

History

History

test

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 19, 2025
Feb 26, 2025
Aug 30, 2024
Jun 5, 2024
Aug 30, 2024
Jan 29, 2025
Jan 29, 2025
Aug 30, 2024
Jan 19, 2025
Aug 30, 2024
Jan 19, 2025
Jun 5, 2024
Aug 20, 2024

Test

Testing JS

In order to test the JS implementation of acp_core and the playground, the test pkg defines a wrapper over the JS wrapper.

The JS wrapper defined in the internal/playground_js pkg wraps a PlaygroundService such that it receives as input JS objects, transforms them into go objects and maps the output as JS objects again.

Testing in the JS environment is done by adding yet another layer, which takes Go inputs and transforms it into JS inputs. This enables reusing the entire test suite as in, without requiring additional setup.

In the future, an interesting approach could be to employ differential testing as well, where the Go codebase can be used as a test oracle. Any difference in output between the Wasm/JS version and the Go version indicates an error.