For the complete documentation index, see llms.txt. This page is also available as Markdown.

Node.js Agent

Set up the SeaLights Node.js Agent for frontend and backend JavaScript applications.

Use the Node.js Agent to collect coverage and test data from JavaScript and TypeScript applications.

It supports:

  • Frontend apps such as Angular, React, and Vue

  • Backend Node.js services

  • In-process test coverage uploads

  • Out-of-process functional test coverage

This page helps you choose the right setup. Use the stepper to pick the application path and test flow that match your use case.

1

Start here

Follow these pages in order:

  1. Download the agent

  2. Generate a session ID

  3. Scan your application

After the scan, choose your application path and test flow.

2

Choose your application path

Choose the application path that matches your build and deployment model.

Use this path for bundled browser apps.

  • Scan the built output

  • Instrument the files with instrument before deployment

  • Run out-of-process functional tests against the instrumented app

Next pages:

Use this path for Node.js APIs, workers, and server processes.

  • Scan the service code

  • Start the app with run

  • Run out-of-process functional tests against the live service

Next pages:

3

Choose your test flow

Choose the test flow that matches how your tests run and where coverage comes from.

Use this flow when the test runner executes the application code in the same process.

Typical examples:

  • Unit tests

  • In-process integration tests

  • Mocha, Karma, or AVA runs that produce NYC coverage

How it works:

  • Open a test stage

  • Run the tests

  • Upload JUnit results

  • Upload the NYC coverage file with nycReport

This flow uses the test runner output as the coverage source. It does not rely on a separately running application.

Framework pages:

Use this flow when tests run against a separate application process.

Typical examples:

  • Functional tests

  • End-to-end tests

  • Browser or API tests that target a running app

How it works:

  • Scan the app

  • Instrument the frontend build or start the backend with run

  • Open a test stage for the external test runner

  • Run the tests against the live app

  • Upload JUnit results while the app reports footprints

Choose this flow for functional, API, browser, and end-to-end tests that target a live application.

Mocha can also be used here when it drives a separate running application. Other common frameworks include Playwright and similar functional test runners.

Next pages:

Common next pages

Last updated

Was this helpful?