Skip to content

Commit

Permalink
test: create missing symlink directory
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Mar 7, 2024
1 parent fca7722 commit dcec5fe
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ export const pkgroll = async (
},
);

export const installTypeScript = (fixturePath: string) => fs.symlink(
path.resolve('node_modules/typescript'),
path.join(fixturePath, 'node_modules/typescript'),
'dir',
);
export const installTypeScript = async (fixturePath: string) => {
const nodeModulesDirectory = path.join(fixturePath, 'node_modules');

await fs.mkdir(nodeModulesDirectory, { recursive: true });
await fs.symlink(
path.resolve('node_modules/typescript'),
path.join(nodeModulesDirectory, 'typescript'),
'dir',
);
};

0 comments on commit dcec5fe

Please sign in to comment.