Skip to content

Commit 1560d0f

Browse files
authoredMar 31, 2025··
feat: add flags Addon to blockVitest (#2072)
## PR Checklist - [x] Addresses an existing open issue: fixes #2071 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview 🎁
1 parent 72dce1e commit 1560d0f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎src/blocks/blockVitest.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ describe("blockVitest", () => {
522522
include: ["src/"],
523523
},
524524
exclude: ["lib/"],
525+
flags: ["--typecheck"],
525526
},
526527
options: optionsBase,
527528
});
@@ -687,7 +688,7 @@ describe("blockVitest", () => {
687688
"vitest": "3.0.9",
688689
},
689690
"scripts": {
690-
"test": "vitest",
691+
"test": "vitest --typecheck",
691692
},
692693
},
693694
},

‎src/blocks/blockVitest.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const blockVitest = base.createBlock({
2929
})
3030
.default({}),
3131
exclude: z.array(z.string()).default([]),
32+
flags: z.array(z.string()).default([]),
3233
},
3334
produce({ addons }) {
3435
const { actionSteps, coverage, exclude = [] } = addons;
@@ -153,7 +154,7 @@ describe(greet, () => {
153154
"vitest",
154155
),
155156
scripts: {
156-
test: "vitest",
157+
test: `vitest ${addons.flags.join(" ")}`.trim(),
157158
},
158159
},
159160
}),

0 commit comments

Comments
 (0)
Please sign in to comment.