mutation-testing-real-time

3.5.3 • Public • Published

Mutation testing badge Build Status

Mutation testing Real time

A NodeJS helper package to help with the server side of real-time reporting.

Usage example

import { createServer } from 'http';
import { RealTimeReporter } from 'mutation-testing-real-time';

const reporter = new RealTimeReporter({ accessControlAllowOrigin: '*' });
const server = new createServer((req, res) => {
  if (req.url === '/sse') {
    reporter.add(res);
  }
});

// Whenever a mutant result comes in:
reporter.sendMutantTested({ id: '1', status: 'Killed' });
// ...

// Whenever we are done:
reporter.sendFinished();

API Reference

RealTimeReporter

RealTimeReporter.prototype.sendMutantTested [(Partial<MutationTestResult>) => void]

RealTimeReporter.prototype.sendFinished [() => void]

Event: 'client-connected'

  • client: MutationEventSender

Emitted each time a client connects to this real time reporter.

Event: 'client-disconnected'

  • client: MutationEventSender

Emitted each time a client disconnects from this real time reporter.

Package Sidebar

Install

npm i mutation-testing-real-time

Weekly Downloads

18

Version

3.5.3

License

none

Unpacked Size

29.6 kB

Total Files

24

Last publish

Collaborators

  • strykermutator-npa