How to use the @stryker-mutator/api/plugin.declareClassPlugin function in @stryker-mutator/api

To help you get started, we’ve selected a few @stryker-mutator/api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stryker-mutator / stryker / packages / karma-runner / src / index.ts View on Github external
import { declareClassPlugin, PluginKind } from '@stryker-mutator/api/plugin';

import KarmaTestRunner from './KarmaTestRunner';

export const strykerPlugins = [declareClassPlugin(PluginKind.TestRunner, 'karma', KarmaTestRunner)];
github stryker-mutator / stryker / packages / html-reporter / src / index.ts View on Github external
import { declareClassPlugin, PluginKind } from '@stryker-mutator/api/plugin';

import HtmlReporter from './HtmlReporter';

export const strykerPlugins = [declareClassPlugin(PluginKind.Reporter, 'html', HtmlReporter)];
github stryker-mutator / stryker / packages / jest-runner / src / index.ts View on Github external
import { declareClassPlugin, declareFactoryPlugin, PluginKind } from '@stryker-mutator/api/plugin';

import JestConfigEditor from './JestConfigEditor';
import { jestTestRunnerFactory } from './JestTestRunner';

process.env.BABEL_ENV = 'test';

export const strykerPlugins = [
  declareClassPlugin(PluginKind.ConfigEditor, 'jest', JestConfigEditor),
  declareFactoryPlugin(PluginKind.TestRunner, 'jest', jestTestRunnerFactory)
];
github stryker-mutator / stryker / packages / core / src / reporters / index.ts View on Github external
import { declareClassPlugin, declareFactoryPlugin, PluginKind } from '@stryker-mutator/api/plugin';

import ClearTextReporter from './ClearTextReporter';
import { dashboardReporterFactory } from './dashboard-reporter';
import DotsReporter from './DotsReporter';
import EventRecorderReporter from './EventRecorderReporter';
import ProgressAppendOnlyReporter from './ProgressAppendOnlyReporter';
import ProgressReporter from './ProgressReporter';

export const strykerPlugins = [
  declareClassPlugin(PluginKind.Reporter, 'clear-text', ClearTextReporter),
  declareClassPlugin(PluginKind.Reporter, 'progress', ProgressReporter),
  declareClassPlugin(PluginKind.Reporter, 'progress-append-only', ProgressAppendOnlyReporter),
  declareClassPlugin(PluginKind.Reporter, 'dots', DotsReporter),
  declareClassPlugin(PluginKind.Reporter, 'event-recorder', EventRecorderReporter),
  declareFactoryPlugin(PluginKind.Reporter, 'dashboard', dashboardReporterFactory)
];
github stryker-mutator / stryker / packages / core / src / reporters / index.ts View on Github external
import { declareClassPlugin, declareFactoryPlugin, PluginKind } from '@stryker-mutator/api/plugin';

import ClearTextReporter from './ClearTextReporter';
import { dashboardReporterFactory } from './dashboard-reporter';
import DotsReporter from './DotsReporter';
import EventRecorderReporter from './EventRecorderReporter';
import ProgressAppendOnlyReporter from './ProgressAppendOnlyReporter';
import ProgressReporter from './ProgressReporter';

export const strykerPlugins = [
  declareClassPlugin(PluginKind.Reporter, 'clear-text', ClearTextReporter),
  declareClassPlugin(PluginKind.Reporter, 'progress', ProgressReporter),
  declareClassPlugin(PluginKind.Reporter, 'progress-append-only', ProgressAppendOnlyReporter),
  declareClassPlugin(PluginKind.Reporter, 'dots', DotsReporter),
  declareClassPlugin(PluginKind.Reporter, 'event-recorder', EventRecorderReporter),
  declareFactoryPlugin(PluginKind.Reporter, 'dashboard', dashboardReporterFactory)
];
github stryker-mutator / stryker / packages / core / src / reporters / index.ts View on Github external
import { declareClassPlugin, declareFactoryPlugin, PluginKind } from '@stryker-mutator/api/plugin';

import ClearTextReporter from './ClearTextReporter';
import { dashboardReporterFactory } from './dashboard-reporter';
import DotsReporter from './DotsReporter';
import EventRecorderReporter from './EventRecorderReporter';
import ProgressAppendOnlyReporter from './ProgressAppendOnlyReporter';
import ProgressReporter from './ProgressReporter';

export const strykerPlugins = [
  declareClassPlugin(PluginKind.Reporter, 'clear-text', ClearTextReporter),
  declareClassPlugin(PluginKind.Reporter, 'progress', ProgressReporter),
  declareClassPlugin(PluginKind.Reporter, 'progress-append-only', ProgressAppendOnlyReporter),
  declareClassPlugin(PluginKind.Reporter, 'dots', DotsReporter),
  declareClassPlugin(PluginKind.Reporter, 'event-recorder', EventRecorderReporter),
  declareFactoryPlugin(PluginKind.Reporter, 'dashboard', dashboardReporterFactory)
];
github stryker-mutator / stryker / packages / jasmine-framework / src / index.ts View on Github external
import { declareClassPlugin, PluginKind } from '@stryker-mutator/api/plugin';

import JasmineTestFramework from './JasmineTestFramework';

export const strykerPlugins = [declareClassPlugin(PluginKind.TestFramework, 'jasmine', JasmineTestFramework)];
github stryker-mutator / stryker / packages / core / src / reporters / index.ts View on Github external
import { declareClassPlugin, declareFactoryPlugin, PluginKind } from '@stryker-mutator/api/plugin';

import ClearTextReporter from './ClearTextReporter';
import { dashboardReporterFactory } from './dashboard-reporter';
import DotsReporter from './DotsReporter';
import EventRecorderReporter from './EventRecorderReporter';
import ProgressAppendOnlyReporter from './ProgressAppendOnlyReporter';
import ProgressReporter from './ProgressReporter';

export const strykerPlugins = [
  declareClassPlugin(PluginKind.Reporter, 'clear-text', ClearTextReporter),
  declareClassPlugin(PluginKind.Reporter, 'progress', ProgressReporter),
  declareClassPlugin(PluginKind.Reporter, 'progress-append-only', ProgressAppendOnlyReporter),
  declareClassPlugin(PluginKind.Reporter, 'dots', DotsReporter),
  declareClassPlugin(PluginKind.Reporter, 'event-recorder', EventRecorderReporter),
  declareFactoryPlugin(PluginKind.Reporter, 'dashboard', dashboardReporterFactory)
];
github stryker-mutator / stryker / packages / typescript / src / index.ts View on Github external
import { declareClassPlugin, declareFactoryPlugin, PluginKind } from '@stryker-mutator/api/plugin';

import TypescriptConfigEditor from './TypescriptConfigEditor';
import { typescriptMutatorFactory } from './TypescriptMutator';
import TypescriptTranspiler from './TypescriptTranspiler';

export const strykerPlugins = [
  declareClassPlugin(PluginKind.ConfigEditor, 'typescript', TypescriptConfigEditor),
  declareClassPlugin(PluginKind.Transpiler, 'typescript', TypescriptTranspiler),
  declareFactoryPlugin(PluginKind.Mutator, 'typescript', typescriptMutatorFactory)
];
github stryker-mutator / stryker / packages / mocha-runner / src / index.ts View on Github external
import { BaseContext, commonTokens, declareClassPlugin, declareFactoryPlugin, Injector, PluginKind, tokens } from '@stryker-mutator/api/plugin';

import MochaConfigEditor from './MochaConfigEditor';
import MochaOptionsLoader from './MochaOptionsLoader';
import MochaTestRunner from './MochaTestRunner';

export const strykerPlugins = [
  declareFactoryPlugin(PluginKind.ConfigEditor, 'mocha-runner', mochaConfigEditorFactory),
  declareClassPlugin(PluginKind.TestRunner, 'mocha', MochaTestRunner)
];

mochaConfigEditorFactory.inject = tokens(commonTokens.injector);
function mochaConfigEditorFactory(injector: Injector): MochaConfigEditor {
  return injector.provideClass('loader', MochaOptionsLoader).injectClass(MochaConfigEditor);
}