testing-conventions 0.0.118 → 0.0.120
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.
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The TypeScript mutation adapter
|
|
3
|
-
*
|
|
4
|
-
* `--ts-mutation-adapter` argument, so the binary never hunts the filesystem for it. This runs
|
|
5
|
-
* Stryker through the Node API and emits the normalized results as JSON. `--out <path>` writes
|
|
6
|
-
* them to a file (the rule passes a temp file, so Stryker's own stdout logging can't corrupt
|
|
7
|
-
* them); without it, the JSON goes to stdout. `--mutate <a,b,...>` scopes the run to those Stryker
|
|
8
|
-
* mutate patterns, and `--test-files <a,b,...>` narrows the suites that judge them to the scan
|
|
9
|
-
* path within the package. Rejects on a failed run; `main.ts` maps that onto a non-zero exit code.
|
|
2
|
+
* The TypeScript mutation adapter: run Stryker over `argv`'s scope and emit the normalized results
|
|
3
|
+
* as JSON, to `--out <path>` when given and to stdout otherwise.
|
|
10
4
|
*/
|
|
11
5
|
export declare function mutationCLI(argv: string[]): Promise<void>;
|
|
@@ -2,14 +2,8 @@ import { writeFile } from 'node:fs/promises';
|
|
|
2
2
|
import { parseArgs } from './parse-args.js';
|
|
3
3
|
import { runStryker } from './run-stryker.js';
|
|
4
4
|
/**
|
|
5
|
-
* The TypeScript mutation adapter
|
|
6
|
-
*
|
|
7
|
-
* `--ts-mutation-adapter` argument, so the binary never hunts the filesystem for it. This runs
|
|
8
|
-
* Stryker through the Node API and emits the normalized results as JSON. `--out <path>` writes
|
|
9
|
-
* them to a file (the rule passes a temp file, so Stryker's own stdout logging can't corrupt
|
|
10
|
-
* them); without it, the JSON goes to stdout. `--mutate <a,b,...>` scopes the run to those Stryker
|
|
11
|
-
* mutate patterns, and `--test-files <a,b,...>` narrows the suites that judge them to the scan
|
|
12
|
-
* path within the package. Rejects on a failed run; `main.ts` maps that onto a non-zero exit code.
|
|
5
|
+
* The TypeScript mutation adapter: run Stryker over `argv`'s scope and emit the normalized results
|
|
6
|
+
* as JSON, to `--out <path>` when given and to stdout otherwise.
|
|
13
7
|
*/
|
|
14
8
|
export async function mutationCLI(argv) {
|
|
15
9
|
const { mutate, out, testFiles } = parseArgs(argv);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-cli.js","sourceRoot":"","sources":["../../src/mutation/mutation-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"mutation-cli.js","sourceRoot":"","sources":["../../src/mutation/mutation-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAc;IAC9C,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC;QAC/B,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3C,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;KAClD,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;IAC5C,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;SAAM,CAAC;QACN,MAAM,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -13,11 +13,7 @@ export interface RunStrykerOptions {
|
|
|
13
13
|
testFiles?: string[];
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Run Stryker over the project in the current working directory via its Node API
|
|
17
|
-
*
|
|
18
|
-
* the unit-scoped runner is always used rather than Stryker's default `npm test` command
|
|
19
|
-
* runner, #240, and resolves regardless of the project's location); results come from
|
|
20
|
-
* `runMutationTest()` directly, so there is no report file. Because this runs inside the npm
|
|
21
|
-
* package, `@stryker-mutator/core` resolves natively.
|
|
16
|
+
* Run Stryker over the project in the current working directory via its Node API and return the
|
|
17
|
+
* normalized results.
|
|
22
18
|
*/
|
|
23
19
|
export declare function runStryker(options?: RunStrykerOptions): Promise<NormalizedMutant[]>;
|
|
@@ -5,12 +5,8 @@ import { toNormalized } from './to-normalized.js';
|
|
|
5
5
|
// finds our bundled `@stryker-mutator/vitest-runner`; passing the resolved path loads our copy.
|
|
6
6
|
const vitestRunnerPlugin = createRequire(import.meta.url).resolve('@stryker-mutator/vitest-runner');
|
|
7
7
|
/**
|
|
8
|
-
* Run Stryker over the project in the current working directory via its Node API
|
|
9
|
-
*
|
|
10
|
-
* the unit-scoped runner is always used rather than Stryker's default `npm test` command
|
|
11
|
-
* runner, #240, and resolves regardless of the project's location); results come from
|
|
12
|
-
* `runMutationTest()` directly, so there is no report file. Because this runs inside the npm
|
|
13
|
-
* package, `@stryker-mutator/core` resolves natively.
|
|
8
|
+
* Run Stryker over the project in the current working directory via its Node API and return the
|
|
9
|
+
* normalized results.
|
|
14
10
|
*/
|
|
15
11
|
export async function runStryker(options = {}) {
|
|
16
12
|
const cliOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-stryker.js","sourceRoot":"","sources":["../../src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AC;KAC7E,CAAC;IACF,MAAM,OAAO,GAAG,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,eAAe,EAAE,CAAC;IAChE,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAClC,OAAO,OAAO;SACX,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;SAClD,MAAM,CAAC,CAAC,MAAM,EAA8B,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC;AACrE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testing-conventions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.120",
|
|
4
4
|
"description": "Enforce testing conventions in libraries (Python, TypeScript, and Rust).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/testing-conventions",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"vitest": "^3.2.4"
|
|
56
56
|
},
|
|
57
57
|
"optionalDependencies": {
|
|
58
|
-
"@testing-conventions/x86_64-unknown-linux-gnu": "0.0.
|
|
59
|
-
"@testing-conventions/aarch64-unknown-linux-gnu": "0.0.
|
|
60
|
-
"@testing-conventions/x86_64-apple-darwin": "0.0.
|
|
61
|
-
"@testing-conventions/aarch64-apple-darwin": "0.0.
|
|
62
|
-
"@testing-conventions/x86_64-pc-windows-msvc": "0.0.
|
|
58
|
+
"@testing-conventions/x86_64-unknown-linux-gnu": "0.0.120",
|
|
59
|
+
"@testing-conventions/aarch64-unknown-linux-gnu": "0.0.120",
|
|
60
|
+
"@testing-conventions/x86_64-apple-darwin": "0.0.120",
|
|
61
|
+
"@testing-conventions/aarch64-apple-darwin": "0.0.120",
|
|
62
|
+
"@testing-conventions/x86_64-pc-windows-msvc": "0.0.120"
|
|
63
63
|
}
|
|
64
64
|
}
|