Skip to content

Commit

Permalink
Update util.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Nov 16, 2023
1 parent 2af144e commit df15500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cspell-config-lib/src/test-helpers/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function json(obj: unknown, indent: string | number = 2): string {

export function tempPath(file: string): string {
const testState = expect.getState();
return path.join(__dirname, '../../.temp', testState.currentTestName || 'test', file);
return path.join(__dirname, '../../.temp', testState.currentTestName?.replace(/[^a-z./-]/gi, '_') || 'test', file);
}

export async function createPathForFile(file: string): Promise<void> {
Expand Down

0 comments on commit df15500

Please sign in to comment.