Skip to content

Commit

Permalink
fix test symlink on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 10, 2018
1 parent a300266 commit 071beec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ test('should work', async () => {
require('yorkie/src/install')(path.join(project.dir, 'node_modules'))
// since yorkie isn't actually installed in the test project, we need to
// symlink it
const yorkieDir = path.resolve(require.resolve('yorkie/src/install'), '../../')
fs.symlinkSync(yorkieDir, path.join(project.dir, 'node_modules', 'yorkie'))
fs.symlinkSync(
path.resolve(require.resolve('yorkie/src/install'), '../../'),
path.join(project.dir, 'node_modules', 'yorkie'),
'junction' // needed for windows
)
})
const hook = await read('.git/hooks/pre-commit')
expect(hook).toMatch('#yorkie')
Expand Down
3 changes: 2 additions & 1 deletion packages/@vue/cli/lib/util/setupDevProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = function setupDevProject (targetDir, deps) {
mkdirp.sync(binPath)
fs.symlinkSync(
require.resolve('@vue/cli-service/bin/vue-cli-service'),
path.join(binPath, 'vue-cli-service')
path.join(binPath, 'vue-cli-service'),
'junction' // needed for windows
)
}

0 comments on commit 071beec

Please sign in to comment.