Skip to content

dagger/jest

Repository files navigation

Jest OpenTelemetry auto instruentation

Automatically instrument Jest tests for open telemetry.

Installation

Install @dagger.io/jest in your project

npm install @dagger.io/jest

Setup

You can either follow a no-configuration setup or update your current jest.config.js file.

No configuration setup

Add the following import in your NODE_OPTIONS to auto-instrument when running your test

 "NODE_OPTIONS=\"$NODE_OPTIONS --register @dagger.io/jest/register \" jest

💡 If your project is in ESM, make sure you first followed ECMAScript Module setup on Jest

Jest config setup

⚠️ This setup may not work if you already have custom environment, if so please follow the no configuration setup that can take any environment.

The library export an environment that you can use to automatically instrument your tests:

testEnvironment: "@dagger.io/jest/node-environment"

About

A Dagger toolchain for Jest - a Javascript testing framework.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •