Skip to content

Commit

Permalink
test: fix issue when initializing the fixture files
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Mar 17, 2024
1 parent cd86ab6 commit 91faefd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/__tests__/jsonl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ function fixture(name: string, { temporary = false }: { temporary?: boolean } =
? path.join(__dirname, 'fixtures/jsonl', `${name}.temp.jsonl`)
: path.join(__dirname, 'fixtures/jsonl', `${name}.jsonl`);

fs.mkdirSync(path.dirname(file), { recursive: true });

if (temporary) {
fs.writeFileSync(file, '');
}
Expand Down
2 changes: 2 additions & 0 deletions src/utils/__tests__/stats.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ function fixture(name: string, { temporary = false }: { temporary?: boolean } =
? path.join(__dirname, 'fixtures/stats', `${name}.temp.jsonl`)
: path.join(__dirname, 'fixtures/stats', `${name}.jsonl`);

fs.mkdirSync(path.dirname(file), { recursive: true });

if (temporary) {
fs.writeFileSync(file, '');
}
Expand Down

0 comments on commit 91faefd

Please sign in to comment.