adonisjs / vow

Test Runner For AdonisJs
MIT License
56 stars 18 forks source link

Added -c, --custom signature #32

Closed jericopulvera closed 4 years ago

jericopulvera commented 5 years ago

Proposed changes

Hello. I am proposing to add these custom signature in order to easily add conditions on the test runner.

My Use Case Example

adonis test -c reseed
module.exports = (cli, runner) => {
  runner.before(async () => {
    use('Adonis/Src/Server').listen(process.env.HOST, process.env.PORT)

    if (cli.custom === 'reseed') {
      await ace.call('seed', {}, { silent: true })
      runner.clear()
    }
  })
}

Types of changes

What types of changes does your code introduce?

Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.2%) to 80.971% when pulling 69d199dee0de171e4b40124e65dcac930ded9908 on jericopulvera:develop into 4a461e2144c4ea8bf9b7a5477916cb81c029dc63 on adonisjs:develop.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.2%) to 80.971% when pulling 69d199dee0de171e4b40124e65dcac930ded9908 on jericopulvera:develop into 4a461e2144c4ea8bf9b7a5477916cb81c029dc63 on adonisjs:develop.