Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions scripts/stryker-diff.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ export const PACKAGE_CONFIGS = [
root: "src",
sourceRoot: "src/",
vitestConfig: "vitest.config.ts",
vitestRelated: false,
discoverRelatedTests: true,
// Use plugin-side related-test discovery for the extension package: with an
// explicit STRYKER_TEST_FILES list, stryker-js 10.0.0 plans static mutants with
// runtime activation (stryker-mutator/stryker-js#6144, #6209), which the vitest
// plugin can only apply after top-level code has run, producing false Survived
// results. Revert to vitestRelated: false / discoverRelatedTests: true once the
// upstream planner fix lands.
vitestRelated: true,
discoverRelatedTests: false,
// CI build/coverage tooling under src/scripts is excluded like the other build scripts:
// it is not shipped runtime code and is covered by src/scripts/__tests__/merge-lcov.spec.mjs.
excludedPaths: [
Expand Down
7 changes: 5 additions & 2 deletions scripts/stryker-diff.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,11 @@ describe("buildManifest", () => {
assert.equal(webview.runRoot, ".")
assert.equal(webview.discoverRelatedTests, true)
assert.equal(webview.vitestRelated, false)
assert.equal(extension.discoverRelatedTests, true)
assert.equal(extension.vitestRelated, false)
// The extension package deliberately uses plugin-side discovery (see the
// comment in PACKAGE_CONFIGS): stryker-js 10.0.0 mis-activates static mutants
// when an explicit STRYKER_TEST_FILES list is supplied.
assert.equal(extension.discoverRelatedTests, false)
assert.equal(extension.vitestRelated, true)
Comment thread
easonLiangWorldedtech marked this conversation as resolved.
const types = manifest.packages.find(({ id }) => id === "types")
assert.equal(types.discoverRelatedTests, undefined)
assert.equal(types.vitestRelated, undefined)
Expand Down
Loading