package
0.2.0
Repository: https://github.com/sourcenetwork/acp_core.git
Documentation: pkg.go.dev

# README

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.

# Packages

No description provided by the author
package js provides utilities to test the wasm js compiled version of acp_core.
No description provided by the author

# Functions

AssertResults is a general helper for computations which return a result and an error if wantErr is specified, it asserts that gotErr is a match otherwise, it asserts got and want are a match and that gotErr is nil.
No description provided by the author
NewTestRuntime returns a runtime for executing tests.

# Variables

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author