This is a go module used for communicating between jsii-pacmak generated go code and the JSII node process. JSII modules, when compiled into go modules, depend on this package and call the various functions in jsii-runtime-go/runtime.go
to setup and communicate with the JSII kernel process.
To see what this looks like in practice you can perform the following steps:
- Clone the repository and build all packages with
yarn install && yarn build
from the root - Navigate to the
packages/@jsii/go-runtime
directory - run
yarn test:calc
This will run code generation against all of the jsii-calc modules and place the built go modules into the jsii-calc/golang
directory. The code in jsii-calc-test
imports these generated modules and can be used to test runtime functionality. yarn test:calc
also runs go run ./jsii-calc-test
.
Unit tests are run with go test
. New unit test files can be added in the jsii-runtime-go
directory.
The jsii-calc-test
module contains the integration test suite.
yarn test:unit
- run unit testsyarn test:calc
- runjsii-calc-test
module binaryyarn test
- runs unit and integration tests