Skip to content

Commit 9d9f6bd

Browse files
inline opts variable
1 parent 3eedec5 commit 9d9f6bd

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/create/createRerunSuggestion.test.ts

+4-9
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ const options = {
4242
title: "Test Title",
4343
} satisfies Options;
4444

45-
const opts = {
46-
...options,
47-
excludeLintKnip: undefined,
48-
};
49-
5045
describe("createRerunSuggestion", () => {
5146
it("includes key-value pairs with mixed truthy and falsy values", () => {
5247
const actual = createRerunSuggestion(options);
@@ -102,25 +97,25 @@ describe("createRerunSuggestion", () => {
10297

10398
it("does not list all excludes when using common base", () => {
10499
const common = createRerunSuggestion({
105-
...opts,
106100
base: "common",
107101
...getExclusions(options, "common"),
102+
excludeLintKnip: undefined,
108103
});
109104

110105
expect(common).toMatchInlineSnapshot(
111-
'"npx create-typescript-app --mode create --base common --access public --author TestAuthor --description \\"Test description.\\" --directory . --email-github [email protected] --email-npm [email protected] --exclude-all-contributors true --keywords \\"abc def ghi jkl mno pqr\\" --mode create --owner TestOwner --repository test-repository --skip-github-api true --skip-install true --skip-removal true --title \\"Test Title\\""',
106+
'"npx create-typescript-app --mode undefined --base common"',
112107
);
113108
});
114109

115110
it("does not list all excludes when using minimum base", () => {
116111
const minimum = createRerunSuggestion({
117-
...opts,
118112
base: "minimum",
119113
...getExclusions(options, "minimum"),
114+
excludeLintKnip: undefined,
120115
});
121116

122117
expect(minimum).toMatchInlineSnapshot(
123-
'"npx create-typescript-app --mode create --base minimum --access public --author TestAuthor --description \\"Test description.\\" --directory . --email-github [email protected] --email-npm [email protected] --keywords \\"abc def ghi jkl mno pqr\\" --mode create --owner TestOwner --repository test-repository --skip-github-api true --skip-install true --skip-removal true --title \\"Test Title\\""',
118+
'"npx create-typescript-app --mode undefined --base minimum"',
124119
);
125120
});
126121
});

0 commit comments

Comments
 (0)