-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: overhaul for scripts and their end-to-end tests (#1187)
## PR Checklist - [x] Addresses an existing open issue: fixes #1141; fixes #1186 - [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 Adds some inline comments to end-to-end tests, as well as a more full description of what to do with migration snapshots in development docs. Also simplifies the migration test error to suggest looking at the docs. Touches a little bit on what #1045 requests around more clear and standardized token docs. Co-authored-by: John Reilly <johnny_reilly@hotmail.com> Co-authored-by: Mohammad Bagher Abiyat <zorofight94@gmail.com>
- Loading branch information
1 parent
0b2d425
commit 6f58d7f
Showing
15 changed files
with
269 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { describe, expect, it } from "vitest"; | ||
|
||
import { createDotESLintignore } from "./createDotESLintignore.js"; | ||
|
||
describe("createDotESLintignore", () => { | ||
it("creates an ignore file with coverage when excludeTests is false", () => { | ||
const actual = createDotESLintignore({ excludeTests: false }); | ||
|
||
expect(actual).toMatchInlineSnapshot(` | ||
"!.* | ||
coverage | ||
lib | ||
node_modules | ||
pnpm-lock.yaml | ||
" | ||
`); | ||
}); | ||
|
||
it("creates an ignore file without coverage when excludeTests is true", () => { | ||
const actual = createDotESLintignore({ excludeTests: true }); | ||
|
||
expect(actual).toMatchInlineSnapshot(` | ||
"!.* | ||
lib | ||
node_modules | ||
pnpm-lock.yaml | ||
" | ||
`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Options } from "../../../shared/types.js"; | ||
import { formatIgnoreFile } from "./formatters/formatIgnoreFile.js"; | ||
|
||
export function createDotESLintignore(options: Pick<Options, "excludeTests">) { | ||
return formatIgnoreFile( | ||
[ | ||
"!.*", | ||
...(options.excludeTests ? [] : ["coverage"]), | ||
"lib", | ||
"node_modules", | ||
"pnpm-lock.yaml", | ||
].filter(Boolean), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { describe, expect, it } from "vitest"; | ||
|
||
import { createDotGitignore } from "./createDotGitignore.js"; | ||
|
||
describe("createDotGitignore", () => { | ||
it("creates an ignore file with coverage when excludeTests is false", () => { | ||
const actual = createDotGitignore({ excludeTests: false }); | ||
|
||
expect(actual).toMatchInlineSnapshot(` | ||
"coverage/ | ||
lib/ | ||
node_modules/ | ||
" | ||
`); | ||
}); | ||
|
||
it("creates an ignore file without coverage when excludeTests is true", () => { | ||
const actual = createDotGitignore({ excludeTests: true }); | ||
|
||
expect(actual).toMatchInlineSnapshot(` | ||
"lib/ | ||
node_modules/ | ||
" | ||
`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Options } from "../../../shared/types.js"; | ||
import { formatIgnoreFile } from "./formatters/formatIgnoreFile.js"; | ||
|
||
export function createDotGitignore(options: Pick<Options, "excludeTests">) { | ||
return formatIgnoreFile([ | ||
...(options.excludeTests ? [] : ["coverage/"]), | ||
"lib/", | ||
"node_modules/", | ||
]); | ||
} |
Oops, something went wrong.