Skip to content

Commit 61e37d9

Browse files
committed
Use node api instead of spawning commands to link babel-jest
1 parent 56b71df commit 61e37d9

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

integration-tests/__tests__/transform.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('no babel-jest', () => {
5656
linkJestPackage('babel-jest', tempDir);
5757
});
5858

59-
it('fails with syntax error on flow types', () => {
59+
test('fails with syntax error on flow types', () => {
6060
const {stderr} = runJest(tempDir, ['--no-cache', '--no-watchman']);
6161
expect(stderr).toMatch(/FAIL.*fails_with_syntax_error/);
6262
expect(stderr).toMatch('Unexpected token');

integration-tests/utils.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ const linkJestPackage = (packageName: string, cwd: Path) => {
4343
const packagesDir = path.resolve(__dirname, '../packages');
4444
const packagePath = path.resolve(packagesDir, packageName);
4545
const destination = path.resolve(cwd, 'node_modules/');
46-
run(`mkdir -p ${destination}`);
47-
return run(`ln -sf ${packagePath} ${destination}`);
46+
mkdirp.sync(destination);
47+
rimraf.sync(destination);
48+
fs.symlinkSync(packagePath, destination, 'dir');
4849
};
4950

5051
const fileExists = (filePath: Path) => {

0 commit comments

Comments
 (0)