Skip to content

Commit 071beec

Browse files
committed
fix test symlink on windows
1 parent a300266 commit 071beec

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/@vue/cli-plugin-eslint/__tests__/eslintPlugin.spec.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ test('should work', async () => {
3737
require('yorkie/src/install')(path.join(project.dir, 'node_modules'))
3838
// since yorkie isn't actually installed in the test project, we need to
3939
// symlink it
40-
const yorkieDir = path.resolve(require.resolve('yorkie/src/install'), '../../')
41-
fs.symlinkSync(yorkieDir, path.join(project.dir, 'node_modules', 'yorkie'))
40+
fs.symlinkSync(
41+
path.resolve(require.resolve('yorkie/src/install'), '../../'),
42+
path.join(project.dir, 'node_modules', 'yorkie'),
43+
'junction' // needed for windows
44+
)
4245
})
4346
const hook = await read('.git/hooks/pre-commit')
4447
expect(hook).toMatch('#yorkie')

packages/@vue/cli/lib/util/setupDevProject.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = function setupDevProject (targetDir, deps) {
2323
mkdirp.sync(binPath)
2424
fs.symlinkSync(
2525
require.resolve('@vue/cli-service/bin/vue-cli-service'),
26-
path.join(binPath, 'vue-cli-service')
26+
path.join(binPath, 'vue-cli-service'),
27+
'junction' // needed for windows
2728
)
2829
}

0 commit comments

Comments
 (0)