vow
vow copied to clipboard
Add "trait" method to runner instance for global traits
Proposed changes
Currently, to use the "DatabaseTransactions" trait you need to add it to each test. But chances are, if you use it in one test, you likely need it in all the other ones that require db access too. This change allows you to add traits to the runner instance, these "global traits" will be added to each test suite. Now the migration process for testing is all inside "vowfile.js".
Types of changes
What types of changes does your code introduce?
Put an x in the boxes that apply
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
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.
- [x] I have read the CONTRIBUTING doc
- [x] Lint and unit tests pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if appropriate)