Skip to content

Commit dcec5fe

Browse files
committed
test: create missing symlink directory
1 parent fca7722 commit dcec5fe

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

tests/utils.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ export const pkgroll = async (
1818
},
1919
);
2020

21-
export const installTypeScript = (fixturePath: string) => fs.symlink(
22-
path.resolve('node_modules/typescript'),
23-
path.join(fixturePath, 'node_modules/typescript'),
24-
'dir',
25-
);
21+
export const installTypeScript = async (fixturePath: string) => {
22+
const nodeModulesDirectory = path.join(fixturePath, 'node_modules');
23+
24+
await fs.mkdir(nodeModulesDirectory, { recursive: true });
25+
await fs.symlink(
26+
path.resolve('node_modules/typescript'),
27+
path.join(nodeModulesDirectory, 'typescript'),
28+
'dir',
29+
);
30+
};

0 commit comments

Comments
 (0)