@d-es-ign/stryker-js-api 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +25 -0
- package/core.d.ts +3 -0
- package/dist/schema/stryker-core.json +567 -0
- package/dist/src/check/check-result.d.ts +10 -0
- package/dist/src/check/check-result.d.ts.map +1 -0
- package/dist/src/check/check-result.js +2 -0
- package/dist/src/check/check-result.js.map +1 -0
- package/dist/src/check/check-status.d.ts +5 -0
- package/dist/src/check/check-status.d.ts.map +1 -0
- package/dist/src/check/check-status.js +6 -0
- package/dist/src/check/check-status.js.map +1 -0
- package/dist/src/check/checker.d.ts +19 -0
- package/dist/src/check/checker.d.ts.map +1 -0
- package/dist/src/check/checker.js +2 -0
- package/dist/src/check/checker.js.map +1 -0
- package/dist/src/check/index.d.ts +4 -0
- package/dist/src/check/index.d.ts.map +1 -0
- package/dist/src/check/index.js +4 -0
- package/dist/src/check/index.js.map +1 -0
- package/dist/src/check/mutant-status.d.ts +11 -0
- package/dist/src/check/mutant-status.d.ts.map +1 -0
- package/dist/src/check/mutant-status.js +12 -0
- package/dist/src/check/mutant-status.js.map +1 -0
- package/dist/src/core/file-description.d.ts +13 -0
- package/dist/src/core/file-description.d.ts.map +1 -0
- package/dist/src/core/file-description.js +2 -0
- package/dist/src/core/file-description.js.map +1 -0
- package/dist/src/core/index.d.ts +17 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/index.js +15 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/instrument.d.ts +21 -0
- package/dist/src/core/instrument.d.ts.map +1 -0
- package/dist/src/core/instrument.js +16 -0
- package/dist/src/core/instrument.js.map +1 -0
- package/dist/src/core/location.d.ts +9 -0
- package/dist/src/core/location.d.ts.map +1 -0
- package/dist/src/core/location.js +2 -0
- package/dist/src/core/location.js.map +1 -0
- package/dist/src/core/mutant-coverage.d.ts +10 -0
- package/dist/src/core/mutant-coverage.d.ts.map +1 -0
- package/dist/src/core/mutant-coverage.js +2 -0
- package/dist/src/core/mutant-coverage.js.map +1 -0
- package/dist/src/core/mutant-test-plan.d.ts +52 -0
- package/dist/src/core/mutant-test-plan.d.ts.map +1 -0
- package/dist/src/core/mutant-test-plan.js +15 -0
- package/dist/src/core/mutant-test-plan.js.map +1 -0
- package/dist/src/core/mutant.d.ts +36 -0
- package/dist/src/core/mutant.d.ts.map +1 -0
- package/dist/src/core/mutant.js +2 -0
- package/dist/src/core/mutant.js.map +1 -0
- package/dist/src/core/mutation-range.d.ts +15 -0
- package/dist/src/core/mutation-range.d.ts.map +1 -0
- package/dist/src/core/mutation-range.js +2 -0
- package/dist/src/core/mutation-range.js.map +1 -0
- package/dist/src/core/partial-stryker-options.d.ts +12 -0
- package/dist/src/core/partial-stryker-options.d.ts.map +1 -0
- package/dist/src/core/partial-stryker-options.js +2 -0
- package/dist/src/core/partial-stryker-options.js.map +1 -0
- package/dist/src/core/position.d.ts +9 -0
- package/dist/src/core/position.d.ts.map +1 -0
- package/dist/src/core/position.js +2 -0
- package/dist/src/core/position.js.map +1 -0
- package/dist/src/core/report-types.d.ts +3 -0
- package/dist/src/core/report-types.d.ts.map +1 -0
- package/dist/src/core/report-types.js +5 -0
- package/dist/src/core/report-types.js.map +1 -0
- package/dist/src/core/stryker-options-schema.d.ts +3 -0
- package/dist/src/core/stryker-options-schema.d.ts.map +1 -0
- package/dist/src/core/stryker-options-schema.js +5 -0
- package/dist/src/core/stryker-options-schema.js.map +1 -0
- package/dist/src/ignore/ignorer.d.ts +6 -0
- package/dist/src/ignore/ignorer.d.ts.map +1 -0
- package/dist/src/ignore/ignorer.js +2 -0
- package/dist/src/ignore/ignorer.js.map +1 -0
- package/dist/src/ignore/index.d.ts +2 -0
- package/dist/src/ignore/index.d.ts.map +1 -0
- package/dist/src/ignore/index.js +2 -0
- package/dist/src/ignore/index.js.map +1 -0
- package/dist/src/logging/index.d.ts +3 -0
- package/dist/src/logging/index.d.ts.map +1 -0
- package/dist/src/logging/index.js +2 -0
- package/dist/src/logging/index.js.map +1 -0
- package/dist/src/logging/logger-factory-method.d.ts +10 -0
- package/dist/src/logging/logger-factory-method.d.ts.map +1 -0
- package/dist/src/logging/logger-factory-method.js +2 -0
- package/dist/src/logging/logger-factory-method.js.map +1 -0
- package/dist/src/logging/logger.d.ts +15 -0
- package/dist/src/logging/logger.d.ts.map +1 -0
- package/dist/src/logging/logger.js +2 -0
- package/dist/src/logging/logger.js.map +1 -0
- package/dist/src/plugin/contexts.d.ts +19 -0
- package/dist/src/plugin/contexts.d.ts.map +1 -0
- package/dist/src/plugin/contexts.js +2 -0
- package/dist/src/plugin/contexts.js.map +1 -0
- package/dist/src/plugin/index.d.ts +7 -0
- package/dist/src/plugin/index.d.ts.map +1 -0
- package/dist/src/plugin/index.js +6 -0
- package/dist/src/plugin/index.js.map +1 -0
- package/dist/src/plugin/plugin-kind.d.ts +10 -0
- package/dist/src/plugin/plugin-kind.d.ts.map +1 -0
- package/dist/src/plugin/plugin-kind.js +11 -0
- package/dist/src/plugin/plugin-kind.js.map +1 -0
- package/dist/src/plugin/plugins.d.ts +79 -0
- package/dist/src/plugin/plugins.d.ts.map +1 -0
- package/dist/src/plugin/plugins.js +41 -0
- package/dist/src/plugin/plugins.js.map +1 -0
- package/dist/src/plugin/scope.d.ts +5 -0
- package/dist/src/plugin/scope.d.ts.map +1 -0
- package/dist/src/plugin/scope.js +7 -0
- package/dist/src/plugin/scope.js.map +1 -0
- package/dist/src/plugin/tokens.d.ts +22 -0
- package/dist/src/plugin/tokens.d.ts.map +1 -0
- package/dist/src/plugin/tokens.js +33 -0
- package/dist/src/plugin/tokens.js.map +1 -0
- package/dist/src/report/dry-run-completed-event.d.ts +18 -0
- package/dist/src/report/dry-run-completed-event.d.ts.map +1 -0
- package/dist/src/report/dry-run-completed-event.js +2 -0
- package/dist/src/report/dry-run-completed-event.js.map +1 -0
- package/dist/src/report/index.d.ts +4 -0
- package/dist/src/report/index.d.ts.map +1 -0
- package/dist/src/report/index.js +2 -0
- package/dist/src/report/index.js.map +1 -0
- package/dist/src/report/mutation-testing-plan-ready-event.d.ts +5 -0
- package/dist/src/report/mutation-testing-plan-ready-event.d.ts.map +1 -0
- package/dist/src/report/mutation-testing-plan-ready-event.js +2 -0
- package/dist/src/report/mutation-testing-plan-ready-event.js.map +1 -0
- package/dist/src/report/reporter.d.ts +38 -0
- package/dist/src/report/reporter.d.ts.map +1 -0
- package/dist/src/report/reporter.js +2 -0
- package/dist/src/report/reporter.js.map +1 -0
- package/dist/src/test-runner/dry-run-result.d.ts +36 -0
- package/dist/src/test-runner/dry-run-result.d.ts.map +1 -0
- package/dist/src/test-runner/dry-run-result.js +2 -0
- package/dist/src/test-runner/dry-run-result.js.map +1 -0
- package/dist/src/test-runner/dry-run-status.d.ts +15 -0
- package/dist/src/test-runner/dry-run-status.d.ts.map +1 -0
- package/dist/src/test-runner/dry-run-status.js +16 -0
- package/dist/src/test-runner/dry-run-status.js.map +1 -0
- package/dist/src/test-runner/index.d.ts +10 -0
- package/dist/src/test-runner/index.d.ts.map +1 -0
- package/dist/src/test-runner/index.js +10 -0
- package/dist/src/test-runner/index.js.map +1 -0
- package/dist/src/test-runner/mutant-run-result.d.ts +57 -0
- package/dist/src/test-runner/mutant-run-result.d.ts.map +1 -0
- package/dist/src/test-runner/mutant-run-result.js +8 -0
- package/dist/src/test-runner/mutant-run-result.js.map +1 -0
- package/dist/src/test-runner/run-options.d.ts +50 -0
- package/dist/src/test-runner/run-options.d.ts.map +1 -0
- package/dist/src/test-runner/run-options.js +2 -0
- package/dist/src/test-runner/run-options.js.map +1 -0
- package/dist/src/test-runner/run-result-helpers.d.ts +5 -0
- package/dist/src/test-runner/run-result-helpers.d.ts.map +1 -0
- package/dist/src/test-runner/run-result-helpers.js +70 -0
- package/dist/src/test-runner/run-result-helpers.js.map +1 -0
- package/dist/src/test-runner/test-result.d.ts +39 -0
- package/dist/src/test-runner/test-result.d.ts.map +1 -0
- package/dist/src/test-runner/test-result.js +2 -0
- package/dist/src/test-runner/test-result.js.map +1 -0
- package/dist/src/test-runner/test-runner-capabilities.d.ts +12 -0
- package/dist/src/test-runner/test-runner-capabilities.d.ts.map +1 -0
- package/dist/src/test-runner/test-runner-capabilities.js +2 -0
- package/dist/src/test-runner/test-runner-capabilities.js.map +1 -0
- package/dist/src/test-runner/test-runner.d.ts +12 -0
- package/dist/src/test-runner/test-runner.d.ts.map +1 -0
- package/dist/src/test-runner/test-runner.js +2 -0
- package/dist/src/test-runner/test-runner.js.map +1 -0
- package/dist/src/test-runner/test-status.d.ts +18 -0
- package/dist/src/test-runner/test-status.d.ts.map +1 -0
- package/dist/src/test-runner/test-status.js +19 -0
- package/dist/src/test-runner/test-status.js.map +1 -0
- package/dist/src-generated/stryker-core.d.ts +298 -0
- package/dist/src-generated/stryker-core.d.ts.map +1 -0
- package/dist/src-generated/stryker-core.js +7 -0
- package/dist/src-generated/stryker-core.js.map +1 -0
- package/package.json +68 -0
- package/src/check/check-result.ts +12 -0
- package/src/check/check-status.ts +4 -0
- package/src/check/checker.ts +22 -0
- package/src/check/index.ts +3 -0
- package/src/check/mutant-status.ts +10 -0
- package/src/core/file-description.ts +15 -0
- package/src/core/index.ts +16 -0
- package/src/core/instrument.ts +26 -0
- package/src/core/location.ts +9 -0
- package/src/core/mutant-coverage.ts +11 -0
- package/src/core/mutant-test-plan.ts +56 -0
- package/src/core/mutant.ts +54 -0
- package/src/core/mutation-range.ts +16 -0
- package/src/core/partial-stryker-options.ts +14 -0
- package/src/core/position.ts +8 -0
- package/src/core/report-types.ts +6 -0
- package/src/core/stryker-options-schema.ts +11 -0
- package/src/ignore/ignorer.ts +8 -0
- package/src/ignore/index.ts +1 -0
- package/src/logging/index.ts +2 -0
- package/src/logging/logger-factory-method.ts +10 -0
- package/src/logging/logger.ts +15 -0
- package/src/plugin/contexts.ts +21 -0
- package/src/plugin/index.ts +12 -0
- package/src/plugin/plugin-kind.ts +9 -0
- package/src/plugin/plugins.ts +155 -0
- package/src/plugin/scope.ts +6 -0
- package/src/plugin/tokens.ts +35 -0
- package/src/report/dry-run-completed-event.ts +22 -0
- package/src/report/index.ts +6 -0
- package/src/report/mutation-testing-plan-ready-event.ts +5 -0
- package/src/report/reporter.ts +47 -0
- package/src/test-runner/dry-run-result.ts +45 -0
- package/src/test-runner/dry-run-status.ts +14 -0
- package/src/test-runner/index.ts +9 -0
- package/src/test-runner/mutant-run-result.ts +69 -0
- package/src/test-runner/run-options.ts +53 -0
- package/src/test-runner/run-result-helpers.ts +90 -0
- package/src/test-runner/test-result.ts +49 -0
- package/src/test-runner/test-runner-capabilities.ts +11 -0
- package/src/test-runner/test-runner.ts +12 -0
- package/src/test-runner/test-status.ts +17 -0
- package/src-generated/stryker-core.ts +300 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-kind.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-kind.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plugin kinds supported by Stryker
|
|
3
|
+
*/
|
|
4
|
+
export var PluginKind;
|
|
5
|
+
(function (PluginKind) {
|
|
6
|
+
PluginKind["Checker"] = "Checker";
|
|
7
|
+
PluginKind["TestRunner"] = "TestRunner";
|
|
8
|
+
PluginKind["Reporter"] = "Reporter";
|
|
9
|
+
PluginKind["Ignore"] = "Ignore";
|
|
10
|
+
})(PluginKind || (PluginKind = {}));
|
|
11
|
+
//# sourceMappingURL=plugin-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-kind.js","sourceRoot":"","sources":["../../../src/plugin/plugin-kind.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,uCAAyB,CAAA;IACzB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;AACnB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { InjectableClass, InjectableFunction, InjectionToken } from 'typed-inject';
|
|
2
|
+
import { Reporter } from '../report/index.js';
|
|
3
|
+
import { TestRunner } from '../test-runner/index.js';
|
|
4
|
+
import { Checker } from '../check/index.js';
|
|
5
|
+
import { Ignorer } from '../ignore/ignorer.js';
|
|
6
|
+
import { PluginContext } from './contexts.js';
|
|
7
|
+
import { PluginKind } from './plugin-kind.js';
|
|
8
|
+
/**
|
|
9
|
+
* Represents a StrykerPlugin
|
|
10
|
+
*/
|
|
11
|
+
export type Plugin<TPluginKind extends PluginKind> = ClassPlugin<TPluginKind, Array<InjectionToken<PluginContext>>> | FactoryPlugin<TPluginKind, Array<InjectionToken<PluginContext>>> | ValuePlugin<TPluginKind>;
|
|
12
|
+
/**
|
|
13
|
+
* Represents a plugin that is created with a factory method
|
|
14
|
+
*/
|
|
15
|
+
export interface FactoryPlugin<TPluginKind extends PluginKind, Tokens extends Array<InjectionToken<PluginContext>>> {
|
|
16
|
+
readonly kind: TPluginKind;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
/**
|
|
19
|
+
* The factory method used to create the plugin
|
|
20
|
+
*/
|
|
21
|
+
readonly factory: InjectableFunction<PluginContext, PluginInterfaces[TPluginKind], Tokens>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents a plugin that is provided as a simple value.
|
|
25
|
+
*/
|
|
26
|
+
export interface ValuePlugin<TPluginKind extends PluginKind> {
|
|
27
|
+
readonly kind: TPluginKind;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly value: PluginInterfaces[TPluginKind];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Represents a plugin that is created by instantiating a class.
|
|
33
|
+
*/
|
|
34
|
+
export interface ClassPlugin<TPluginKind extends PluginKind, Tokens extends Array<InjectionToken<PluginContext>>> {
|
|
35
|
+
readonly kind: TPluginKind;
|
|
36
|
+
readonly name: string;
|
|
37
|
+
/**
|
|
38
|
+
* The prototype function (class) used to create the plugin.
|
|
39
|
+
* Not called `class` here, because that is a keyword
|
|
40
|
+
*/
|
|
41
|
+
readonly injectableClass: InjectableClass<PluginContext, PluginInterfaces[TPluginKind], Tokens>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Declare a class plugin. Use this method in order to type check the dependency graph of your plugin
|
|
45
|
+
* @param kind The plugin kind
|
|
46
|
+
* @param name The name of the plugin
|
|
47
|
+
* @param injectableClass The class to be instantiated for the plugin
|
|
48
|
+
*/
|
|
49
|
+
export declare function declareClassPlugin<TPluginKind extends PluginKind, Tokens extends Array<InjectionToken<PluginContext>>>(kind: TPluginKind, name: string, injectableClass: InjectableClass<PluginContext, PluginInterfaces[TPluginKind], Tokens>): ClassPlugin<TPluginKind, Tokens>;
|
|
50
|
+
/**
|
|
51
|
+
* Declare a factory plugin. Use this method in order to type check the dependency graph of your plugin,
|
|
52
|
+
* @param kind The plugin kind
|
|
53
|
+
* @param name The name of the plugin
|
|
54
|
+
* @param factory The factory used to instantiate the plugin
|
|
55
|
+
*/
|
|
56
|
+
export declare function declareFactoryPlugin<TPluginKind extends PluginKind, Tokens extends Array<InjectionToken<PluginContext>>>(kind: TPluginKind, name: string, factory: InjectableFunction<PluginContext, PluginInterfaces[TPluginKind], Tokens>): FactoryPlugin<TPluginKind, Tokens>;
|
|
57
|
+
/**
|
|
58
|
+
* Declare a value plugin. Use this method for simple plugins where you don't need values to be injected.
|
|
59
|
+
* @param kind The plugin kind
|
|
60
|
+
* @param name The name of the plugin
|
|
61
|
+
* @param value The plugin
|
|
62
|
+
*/
|
|
63
|
+
export declare function declareValuePlugin<TPluginKind extends PluginKind>(kind: TPluginKind, name: string, value: PluginInterfaces[TPluginKind]): ValuePlugin<TPluginKind>;
|
|
64
|
+
/**
|
|
65
|
+
* Lookup type for plugin interfaces by kind.
|
|
66
|
+
*/
|
|
67
|
+
export interface PluginInterfaces {
|
|
68
|
+
[PluginKind.Reporter]: Reporter;
|
|
69
|
+
[PluginKind.TestRunner]: TestRunner;
|
|
70
|
+
[PluginKind.Checker]: Checker;
|
|
71
|
+
[PluginKind.Ignore]: Ignorer;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Lookup type for plugins by kind.
|
|
75
|
+
*/
|
|
76
|
+
export type Plugins = {
|
|
77
|
+
[TPluginKind in keyof PluginInterfaces]: Plugin<TPluginKind>;
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugins.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PluginKind } from './plugin-kind.js';
|
|
2
|
+
/**
|
|
3
|
+
* Declare a class plugin. Use this method in order to type check the dependency graph of your plugin
|
|
4
|
+
* @param kind The plugin kind
|
|
5
|
+
* @param name The name of the plugin
|
|
6
|
+
* @param injectableClass The class to be instantiated for the plugin
|
|
7
|
+
*/
|
|
8
|
+
export function declareClassPlugin(kind, name, injectableClass) {
|
|
9
|
+
return {
|
|
10
|
+
injectableClass,
|
|
11
|
+
kind,
|
|
12
|
+
name,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Declare a factory plugin. Use this method in order to type check the dependency graph of your plugin,
|
|
17
|
+
* @param kind The plugin kind
|
|
18
|
+
* @param name The name of the plugin
|
|
19
|
+
* @param factory The factory used to instantiate the plugin
|
|
20
|
+
*/
|
|
21
|
+
export function declareFactoryPlugin(kind, name, factory) {
|
|
22
|
+
return {
|
|
23
|
+
factory,
|
|
24
|
+
kind,
|
|
25
|
+
name,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Declare a value plugin. Use this method for simple plugins where you don't need values to be injected.
|
|
30
|
+
* @param kind The plugin kind
|
|
31
|
+
* @param name The name of the plugin
|
|
32
|
+
* @param value The plugin
|
|
33
|
+
*/
|
|
34
|
+
export function declareValuePlugin(kind, name, value) {
|
|
35
|
+
return {
|
|
36
|
+
value,
|
|
37
|
+
kind,
|
|
38
|
+
name,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/plugin/plugins.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA0D9C;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAIhC,IAAiB,EACjB,IAAY,EACZ,eAIC;IAED,OAAO;QACL,eAAe;QACf,IAAI;QACJ,IAAI;KACL,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAIlC,IAAiB,EACjB,IAAY,EACZ,OAIC;IAED,OAAO;QACL,OAAO;QACP,IAAI;QACJ,IAAI;KACL,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAAiB,EACjB,IAAY,EACZ,KAAoC;IAEpC,OAAO;QACL,KAAK;QACL,IAAI;QACJ,IAAI;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../../src/plugin/scope.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,SAAS,cAAc;IACvB,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../src/plugin/scope.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KAGX;AAHD,WAAY,KAAK;IACf,gCAAuB,CAAA;IACvB,gCAAuB,CAAA;AACzB,CAAC,EAHW,KAAK,KAAL,KAAK,QAGhB;AAED,2DAA2D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common tokens used for dependency injection (see typed-inject readme for more information)
|
|
3
|
+
*/
|
|
4
|
+
export declare const commonTokens: Readonly<{
|
|
5
|
+
getLogger: "getLogger";
|
|
6
|
+
injector: "$injector";
|
|
7
|
+
logger: "logger";
|
|
8
|
+
options: "options";
|
|
9
|
+
fileDescriptions: "fileDescriptions";
|
|
10
|
+
target: "$target";
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Helper method to create string literal tuple type.
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const inject = tokens('foo', 'bar');
|
|
17
|
+
* const inject2: ['foo', 'bar'] = ['foo', 'bar'];
|
|
18
|
+
* ```
|
|
19
|
+
* @param tokens The tokens as args
|
|
20
|
+
*/
|
|
21
|
+
export declare function tokens<TS extends string[]>(...tokensList: TS): TS;
|
|
22
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/plugin/tokens.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;EAOvB,CAAC;AAEH;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,UAAU,EAAE,EAAE,GAAG,EAAE,CAEjE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Define a string literal.
|
|
3
|
+
* @param value Token literal
|
|
4
|
+
*/
|
|
5
|
+
function stringLiteral(value) {
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
const target = '$target';
|
|
9
|
+
const injector = '$injector';
|
|
10
|
+
/**
|
|
11
|
+
* Common tokens used for dependency injection (see typed-inject readme for more information)
|
|
12
|
+
*/
|
|
13
|
+
export const commonTokens = Object.freeze({
|
|
14
|
+
getLogger: stringLiteral('getLogger'),
|
|
15
|
+
injector,
|
|
16
|
+
logger: stringLiteral('logger'),
|
|
17
|
+
options: stringLiteral('options'),
|
|
18
|
+
fileDescriptions: stringLiteral('fileDescriptions'),
|
|
19
|
+
target,
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* Helper method to create string literal tuple type.
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const inject = tokens('foo', 'bar');
|
|
26
|
+
* const inject2: ['foo', 'bar'] = ['foo', 'bar'];
|
|
27
|
+
* ```
|
|
28
|
+
* @param tokens The tokens as args
|
|
29
|
+
*/
|
|
30
|
+
export function tokens(...tokensList) {
|
|
31
|
+
return tokensList;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/plugin/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,SAAS,aAAa,CAAmB,KAAQ;IAC/C,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,MAAM,GAAuC,SAAS,CAAC;AAC7D,MAAM,QAAQ,GAAyC,WAAW,CAAC;AAEnE;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE,aAAa,CAAC,WAAW,CAAC;IACrC,QAAQ;IACR,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC;IAC/B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC;IACjC,gBAAgB,EAAE,aAAa,CAAC,kBAAkB,CAAC;IACnD,MAAM;CACP,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,MAAM,CAAsB,GAAG,UAAc;IAC3D,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CompleteDryRunResult, TestRunnerCapabilities } from '../test-runner/index.js';
|
|
2
|
+
export interface DryRunCompletedEvent {
|
|
3
|
+
result: CompleteDryRunResult;
|
|
4
|
+
timing: RunTiming;
|
|
5
|
+
capabilities: TestRunnerCapabilities;
|
|
6
|
+
}
|
|
7
|
+
export interface RunTiming {
|
|
8
|
+
/**
|
|
9
|
+
* The time that the test runner was actually executing tests in milliseconds.
|
|
10
|
+
*/
|
|
11
|
+
net: number;
|
|
12
|
+
/**
|
|
13
|
+
* the time that was spend not executing tests in milliseconds.
|
|
14
|
+
* So the time it took to start the test runner and to report the result.
|
|
15
|
+
*/
|
|
16
|
+
overhead: number;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=dry-run-completed-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dry-run-completed-event.d.ts","sourceRoot":"","sources":["../../../src/report/dry-run-completed-event.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,sBAAsB,CAAC;CACtC;AAED,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dry-run-completed-event.js","sourceRoot":"","sources":["../../../src/report/dry-run-completed-event.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/report/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAC5F,YAAY,EACV,oBAAoB,EACpB,SAAS,GACV,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/report/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutation-testing-plan-ready-event.d.ts","sourceRoot":"","sources":["../../../src/report/mutation-testing-plan-ready-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,6BAA6B;IAC5C,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutation-testing-plan-ready-event.js","sourceRoot":"","sources":["../../../src/report/mutation-testing-plan-ready-event.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { MutationTestMetricsResult } from 'mutation-testing-metrics';
|
|
2
|
+
import { MutantResult, schema } from '../core/index.js';
|
|
3
|
+
import { DryRunCompletedEvent } from './dry-run-completed-event.js';
|
|
4
|
+
import { MutationTestingPlanReadyEvent } from './mutation-testing-plan-ready-event.js';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a reporter which can report during or after a Stryker run
|
|
7
|
+
*/
|
|
8
|
+
export interface Reporter {
|
|
9
|
+
/**
|
|
10
|
+
* An event emitted when the dry run completed successfully.
|
|
11
|
+
* @param event The dry run completed event
|
|
12
|
+
*/
|
|
13
|
+
onDryRunCompleted?(event: DryRunCompletedEvent): void;
|
|
14
|
+
/**
|
|
15
|
+
* An event emitted when the mutant test plan is calculated.
|
|
16
|
+
* @param event The mutant test plan ready event
|
|
17
|
+
*/
|
|
18
|
+
onMutationTestingPlanReady?(event: MutationTestingPlanReadyEvent): void;
|
|
19
|
+
/**
|
|
20
|
+
* Called when a mutant was tested
|
|
21
|
+
* @param result The immutable result
|
|
22
|
+
*/
|
|
23
|
+
onMutantTested?(result: Readonly<MutantResult>): void;
|
|
24
|
+
/**
|
|
25
|
+
* Called when mutation testing is done
|
|
26
|
+
* @param report the mutation test result that is valid according to the mutation-testing-report-schema (json schema)
|
|
27
|
+
* @see https://github.com/stryker-mutator/mutation-testing-elements/blob/master/packages/report-schema/src/mutation-testing-report-schema.json
|
|
28
|
+
*/
|
|
29
|
+
onMutationTestReportReady?(report: Readonly<schema.MutationTestResult>, metrics: Readonly<MutationTestMetricsResult>): void;
|
|
30
|
+
/**
|
|
31
|
+
* Called when stryker wants to quit
|
|
32
|
+
* Gives a reporter the ability to finish up any async tasks
|
|
33
|
+
* Stryker will not close until the promise is either resolved or rejected.
|
|
34
|
+
* @return a promise which will resolve when the reporter is done reporting
|
|
35
|
+
*/
|
|
36
|
+
wrapUp?(): Promise<void> | void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=reporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../../../src/report/reporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,iBAAiB,CAAC,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAEtD;;;OAGG;IACH,0BAA0B,CAAC,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI,CAAC;IAExE;;;OAGG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IAEtD;;;;OAIG;IACH,yBAAyB,CAAC,CACxB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAC3C,OAAO,EAAE,QAAQ,CAAC,yBAAyB,CAAC,GAC3C,IAAI,CAAC;IAER;;;;;OAKG;IACH,MAAM,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../src/report/reporter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MutantCoverage } from '../core/index.js';
|
|
2
|
+
import { DryRunStatus } from './dry-run-status.js';
|
|
3
|
+
import { TestResult } from './test-result.js';
|
|
4
|
+
export type DryRunResult = CompleteDryRunResult | ErrorDryRunResult | TimeoutDryRunResult;
|
|
5
|
+
export interface CompleteDryRunResult {
|
|
6
|
+
/**
|
|
7
|
+
* The individual test results.
|
|
8
|
+
*/
|
|
9
|
+
tests: TestResult[];
|
|
10
|
+
mutantCoverage?: MutantCoverage;
|
|
11
|
+
/**
|
|
12
|
+
* The status of the run
|
|
13
|
+
*/
|
|
14
|
+
status: DryRunStatus.Complete;
|
|
15
|
+
}
|
|
16
|
+
export interface TimeoutDryRunResult {
|
|
17
|
+
/**
|
|
18
|
+
* The status of the run
|
|
19
|
+
*/
|
|
20
|
+
status: DryRunStatus.Timeout;
|
|
21
|
+
/**
|
|
22
|
+
* An optional reason for the timeout
|
|
23
|
+
*/
|
|
24
|
+
reason?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ErrorDryRunResult {
|
|
27
|
+
/**
|
|
28
|
+
* The status of the run
|
|
29
|
+
*/
|
|
30
|
+
status: DryRunStatus.Error;
|
|
31
|
+
/**
|
|
32
|
+
* If `state` is `error`, this collection should contain the error messages
|
|
33
|
+
*/
|
|
34
|
+
errorMessage: string;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=dry-run-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dry-run-result.d.ts","sourceRoot":"","sources":["../../../src/test-runner/dry-run-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,MAAM,YAAY,GACpB,oBAAoB,GACpB,iBAAiB,GACjB,mBAAmB,CAAC;AAExB,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,KAAK,EAAE,UAAU,EAAE,CAAC;IAEpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC;CAC/B;AACD,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC;IAE3B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dry-run-result.js","sourceRoot":"","sources":["../../../src/test-runner/dry-run-result.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum DryRunStatus {
|
|
2
|
+
/**
|
|
3
|
+
* Indicates that a test run is completed with failed or succeeded tests
|
|
4
|
+
*/
|
|
5
|
+
Complete = "complete",
|
|
6
|
+
/**
|
|
7
|
+
* Indicates that a test run cut off early with an error
|
|
8
|
+
*/
|
|
9
|
+
Error = "error",
|
|
10
|
+
/**
|
|
11
|
+
* Indicates that a test run timed out
|
|
12
|
+
*/
|
|
13
|
+
Timeout = "timeout"
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=dry-run-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dry-run-status.d.ts","sourceRoot":"","sources":["../../../src/test-runner/dry-run-status.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB;;OAEG;IACH,QAAQ,aAAa;IACrB;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export var DryRunStatus;
|
|
2
|
+
(function (DryRunStatus) {
|
|
3
|
+
/**
|
|
4
|
+
* Indicates that a test run is completed with failed or succeeded tests
|
|
5
|
+
*/
|
|
6
|
+
DryRunStatus["Complete"] = "complete";
|
|
7
|
+
/**
|
|
8
|
+
* Indicates that a test run cut off early with an error
|
|
9
|
+
*/
|
|
10
|
+
DryRunStatus["Error"] = "error";
|
|
11
|
+
/**
|
|
12
|
+
* Indicates that a test run timed out
|
|
13
|
+
*/
|
|
14
|
+
DryRunStatus["Timeout"] = "timeout";
|
|
15
|
+
})(DryRunStatus || (DryRunStatus = {}));
|
|
16
|
+
//# sourceMappingURL=dry-run-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dry-run-status.js","sourceRoot":"","sources":["../../../src/test-runner/dry-run-status.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB;;OAEG;IACH,qCAAqB,CAAA;IACrB;;OAEG;IACH,+BAAe,CAAA;IACf;;OAEG;IACH,mCAAmB,CAAA;AACrB,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './test-result.js';
|
|
2
|
+
export * from './test-runner.js';
|
|
3
|
+
export * from './test-status.js';
|
|
4
|
+
export * from './dry-run-result.js';
|
|
5
|
+
export * from './run-options.js';
|
|
6
|
+
export * from './mutant-run-result.js';
|
|
7
|
+
export * from './dry-run-status.js';
|
|
8
|
+
export * from './run-result-helpers.js';
|
|
9
|
+
export * from './test-runner-capabilities.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-runner/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './test-result.js';
|
|
2
|
+
export * from './test-runner.js';
|
|
3
|
+
export * from './test-status.js';
|
|
4
|
+
export * from './dry-run-result.js';
|
|
5
|
+
export * from './run-options.js';
|
|
6
|
+
export * from './mutant-run-result.js';
|
|
7
|
+
export * from './dry-run-status.js';
|
|
8
|
+
export * from './run-result-helpers.js';
|
|
9
|
+
export * from './test-runner-capabilities.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/test-runner/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { TestStatus } from './test-status.js';
|
|
2
|
+
export declare enum MutantRunStatus {
|
|
3
|
+
Killed = "killed",
|
|
4
|
+
Survived = "survived",
|
|
5
|
+
Timeout = "timeout",
|
|
6
|
+
Error = "error"
|
|
7
|
+
}
|
|
8
|
+
export type MutantRunResult = ErrorMutantRunResult | KilledMutantRunResult | SurvivedMutantRunResult | TimeoutMutantRunResult;
|
|
9
|
+
export interface TimeoutMutantRunResult {
|
|
10
|
+
status: MutantRunStatus.Timeout;
|
|
11
|
+
/**
|
|
12
|
+
* An optional reason for the timeout
|
|
13
|
+
*/
|
|
14
|
+
reason?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface KilledMutantRunResult {
|
|
17
|
+
status: MutantRunStatus.Killed;
|
|
18
|
+
/**
|
|
19
|
+
* An array with the ids of the tests that killed this mutant
|
|
20
|
+
*/
|
|
21
|
+
killedBy: string[];
|
|
22
|
+
/**
|
|
23
|
+
* The failure message that was reported by first the test
|
|
24
|
+
*/
|
|
25
|
+
failureMessage: string;
|
|
26
|
+
/**
|
|
27
|
+
* The number of total tests ran in this test run.
|
|
28
|
+
*/
|
|
29
|
+
nrOfTests: number;
|
|
30
|
+
/**
|
|
31
|
+
* Optional per-test timing details for tests executed in this mutant run.
|
|
32
|
+
*/
|
|
33
|
+
executedTests?: MutantRunExecutedTest[];
|
|
34
|
+
}
|
|
35
|
+
export interface SurvivedMutantRunResult {
|
|
36
|
+
status: MutantRunStatus.Survived;
|
|
37
|
+
/**
|
|
38
|
+
* The number of total tests ran in this test run.
|
|
39
|
+
*/
|
|
40
|
+
nrOfTests: number;
|
|
41
|
+
/**
|
|
42
|
+
* Optional per-test timing details for tests executed in this mutant run.
|
|
43
|
+
*/
|
|
44
|
+
executedTests?: MutantRunExecutedTest[];
|
|
45
|
+
}
|
|
46
|
+
export interface ErrorMutantRunResult {
|
|
47
|
+
status: MutantRunStatus.Error;
|
|
48
|
+
errorMessage: string;
|
|
49
|
+
}
|
|
50
|
+
export interface MutantRunExecutedTest {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
status: TestStatus;
|
|
54
|
+
timeSpentMs: number;
|
|
55
|
+
fileName?: string;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=mutant-run-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutant-run-result.d.ts","sourceRoot":"","sources":["../../../src/test-runner/mutant-run-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,uBAAuB,GACvB,sBAAsB,CAAC;AAE3B,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;IAC/B;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var MutantRunStatus;
|
|
2
|
+
(function (MutantRunStatus) {
|
|
3
|
+
MutantRunStatus["Killed"] = "killed";
|
|
4
|
+
MutantRunStatus["Survived"] = "survived";
|
|
5
|
+
MutantRunStatus["Timeout"] = "timeout";
|
|
6
|
+
MutantRunStatus["Error"] = "error";
|
|
7
|
+
})(MutantRunStatus || (MutantRunStatus = {}));
|
|
8
|
+
//# sourceMappingURL=mutant-run-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutant-run-result.js","sourceRoot":"","sources":["../../../src/test-runner/mutant-run-result.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;AACjB,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Mutant, CoverageAnalysis } from '../core/index.js';
|
|
2
|
+
export interface RunOptions {
|
|
3
|
+
/**
|
|
4
|
+
* The amount of time (in milliseconds) the TestRunner has to complete the test run before a timeout occurs.
|
|
5
|
+
*/
|
|
6
|
+
timeout: number;
|
|
7
|
+
/**
|
|
8
|
+
* Filled from disableBail in config
|
|
9
|
+
*/
|
|
10
|
+
disableBail: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface DryRunOptions extends RunOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether or not mutant coverage should be collected.
|
|
15
|
+
*/
|
|
16
|
+
coverageAnalysis: CoverageAnalysis;
|
|
17
|
+
/**
|
|
18
|
+
* Files with mutants to run tests for.
|
|
19
|
+
*/
|
|
20
|
+
files?: string[];
|
|
21
|
+
/**
|
|
22
|
+
* If provided, only tests from these files will be executed.
|
|
23
|
+
*/
|
|
24
|
+
testFiles?: string[];
|
|
25
|
+
}
|
|
26
|
+
export type MutantActivation = 'runtime' | 'static';
|
|
27
|
+
export interface MutantRunOptions extends RunOptions {
|
|
28
|
+
testFilter?: string[];
|
|
29
|
+
hitLimit?: number;
|
|
30
|
+
activeMutant: Mutant;
|
|
31
|
+
/**
|
|
32
|
+
* The name of file inside the sandbox in which the mutant resides
|
|
33
|
+
*/
|
|
34
|
+
sandboxFileName: string;
|
|
35
|
+
/**
|
|
36
|
+
* Determine when to active the mutant.
|
|
37
|
+
* - 'runtime'. The test environment should first load all tests and sut files before activating the mutant. Mutant is only active during runtime.
|
|
38
|
+
* - 'static'. The test environment should load _while the mutant is active_. Mutant may be active during the entire lifetime of the process.
|
|
39
|
+
* See https://github.com/stryker-mutator/stryker-js/issues/3442 for more details
|
|
40
|
+
*/
|
|
41
|
+
mutantActivation: MutantActivation;
|
|
42
|
+
/**
|
|
43
|
+
* Determines whether or not the test environment should be reloaded.
|
|
44
|
+
* This is necessary when testing static mutants, where the mutant is only executed when the test environment is loaded.
|
|
45
|
+
* A test runner might be unable to reload the test environment, i.e. when the files were loaded via `import` in nodejs.
|
|
46
|
+
* In which case the test runner should report `reloadEnvironment: false` in it's capabilities.
|
|
47
|
+
*/
|
|
48
|
+
reloadEnvironment: boolean;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=run-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-options.d.ts","sourceRoot":"","sources":["../../../src/test-runner/run-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEpD,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;;;;OAKG;IACH,iBAAiB,EAAE,OAAO,CAAC;CAC5B"}
|