Skip to content

Commit

Permalink
inline opts variable
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Nov 9, 2023
1 parent 3eedec5 commit 9d9f6bd
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/create/createRerunSuggestion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ const options = {
title: "Test Title",
} satisfies Options;

const opts = {
...options,
excludeLintKnip: undefined,
};

describe("createRerunSuggestion", () => {
it("includes key-value pairs with mixed truthy and falsy values", () => {
const actual = createRerunSuggestion(options);
Expand Down Expand Up @@ -102,25 +97,25 @@ describe("createRerunSuggestion", () => {

it("does not list all excludes when using common base", () => {
const common = createRerunSuggestion({
...opts,
base: "common",
...getExclusions(options, "common"),
excludeLintKnip: undefined,
});

expect(common).toMatchInlineSnapshot(
'"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\\""',
'"npx create-typescript-app --mode undefined --base common"',
);
});

it("does not list all excludes when using minimum base", () => {
const minimum = createRerunSuggestion({
...opts,
base: "minimum",
...getExclusions(options, "minimum"),
excludeLintKnip: undefined,
});

expect(minimum).toMatchInlineSnapshot(
'"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\\""',
'"npx create-typescript-app --mode undefined --base minimum"',
);
});
});

0 comments on commit 9d9f6bd

Please sign in to comment.