Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Refine Node API & Improve test [WIP] #1395

Merged
merged 21 commits into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/@vuepress/test-utils/lib/createJestRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ const usedPorts = []

module.exports = function createJestRunner (jestArgs) {
return async function () {
let args = [...jestArgs, ...rawArgs]
const execArgv = getChildProcesExecArgv()
args = [...execArgv, 'node_modules/.bin/jest', ...args]
const args = [...execArgv, ...jestArgs, ...rawArgs]
console.log(`running node with args: ${args.join(' ')}`)
await execa('node', args, {
await execa('jest', args, {
Copy link
Member Author

@ulivz ulivz Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jest runner is running under a child process, this change will cause the fail of debug since --inspect-brk is a node-level flag.

To make debug work, we need ensure that Parent and child process won't share the same inspecting port;

Copy link
Member Author

@ulivz ulivz Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this feature request first, and I believe this is not the real reason why Windows can't run test. Looking forward to your PR later. 😉

stdio: 'inherit'
})
}
Expand Down
4 changes: 3 additions & 1 deletion packages/@vuepress/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"execa": "^0.10.0",
"jest-serializer-vue": "^1.0.0",
"ts-jest": "^23.10.5",
"vue-jest": "^4.0.0-beta.1"
"vue": "^2.5.16",
"vue-jest": "^4.0.0-beta.1",
"vue-template-compiler": "^2.5.16"
},
"author": "ULIVZ <[email protected]>",
"license": "MIT",
Expand Down