/js-buildkite-analytics

Buildkite Test Analytics Collector for Javascript

Primary LanguageJavaScript

Buildkite Test Analytics Collector for Javascript

Jest

  1. Setup a project on Buildkite Test Analytics and note the key
  2. Add 'buildkite-analytics' to your npm packages
  3. Configure Jest to use the reporter and enable testLocationInResults
  // jest.config.js
  reporters: [
    'default',
    'buildkite-analytics/jest-reporter'
  ],
  testLocationInResults: true
  1. set the environment variable for your test analytics
  export BUILDKITE_ANALYTICS_KEY=xyz
  1. Run your tests

To enable debugging, set BUILDKITE_ANALYTICS_DEBUG=true