Skip to content

Commit dc77b91

Browse files
committed
Add flag to prevent test cleanup
This is useful for manually inspecting a generated test fixture after it has failed
1 parent 205b30d commit dc77b91

File tree

1 file changed

+3
-0
lines changed
  • packages/tailwindcss-language-server/src/testing

1 file changed

+3
-0
lines changed

packages/tailwindcss-language-server/src/testing/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface Storage {
1717
export interface TestConfig<Extras extends {}> {
1818
name: string
1919
fs?: Storage
20+
debug?: boolean
2021
prepare?(utils: TestUtils): Promise<Extras>
2122
handle(utils: TestUtils & Extras): void | Promise<void>
2223

@@ -56,6 +57,8 @@ async function setup<T>(config: TestConfig<T>): Promise<TestUtils> {
5657

5758
if (path.sep === '\\') return
5859

60+
if (config.debug) return
61+
5962
// Remove the directory on *nix systems. Recursive removal on Windows will
6063
// randomly fail b/c its slow and buggy.
6164
await fs.rm(doneDir, { recursive: true })

0 commit comments

Comments
 (0)