ui.js 520 B

123456789101112131415161718
  1. module.exports = api => {
  2. api.describeTask({
  3. match: /vue-cli-service test:unit/,
  4. description: 'org.vue.mocha.tasks.test.description',
  5. link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-unit-mocha#injected-commands',
  6. prompts: [
  7. {
  8. name: 'watch',
  9. type: 'confirm',
  10. default: false,
  11. description: 'org.vue.mocha.tasks.test.watch'
  12. }
  13. ],
  14. onBeforeRun: ({ answers, args }) => {
  15. if (answers.watch) args.push('--watch')
  16. }
  17. })
  18. }