This folder contains integration tests that can be run in the LLRT runtime or in a standard Node.js environment using vitest. The tests are designed to be environment-agnostic so that behavior can be compared when running the same code in LLRT versus Node.js.
By leveraging vitest's integration with Typescript, these tests can easily be executed outside the LLRT runtime. This allows validation that the code functions the same in LLRT as it does in a typical Node.js runtime.
The goal is to have a suite of integration tests that provide confidence the code will work correctly regardless of whether LLRT or native Node.js is used as the runtime. Running the tests in different environments ensures compatibility and consistent behavior.
The simplest way to run the E2E tests is:
make test-e2eThis will:
- Deploy the CloudFormation stack with required AWS resources (S3 bucket, Cognito Identity Pool, MRAP)
- Export environment variables from the stack outputs and AWS credentials
- Build the JS bundles
- Run the tests
- AWS CLI configured with valid credentials
jqis not required — the Makefile handles environment setup automatically
If you prefer to set up manually:
-
Deploy the CloudFormation stack:
make setup-e2e
-
Export environment variables:
eval $(make e2e-env)
-
Run a specific test (assuming LLRT is already built):
make bundle/js/%.js && target/debug/llrt test s3.e2e.test