-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
test: replace requireInject with t.mock tap api #2370
test: replace requireInject with t.mock tap api #2370
Conversation
8c01f81
to
c50be61
Compare
- Replaces all usage of `requireInject` with `t.mock` - Standardizes usage of tap as: `const t = require('tap')` - Fixes some minor inconsistencies in tests
c50be61
to
8742c17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocked: Need to land the change in tap
first & then update the dep in package.json
@ruyadorno we need to land this. @isaacs I'm willing to commit resources to get this across the finish line next week, unless you've got any reservations about landing it. I know It probably means cutting a minor of |
We need to update to tap@15 (not yet released at this point in time) and do a second pass of updating all test files, fixing conflicts and migrating new instances of I'm removing the |
Woohoo! This got done in #3069 |
🥳 |
requireInject
witht.mock
const t = require('tap')
requireInject
placed mocks within therequire.cache
and made mocksavailable for nested files, this type of scenario now requires an extra
t.mock
declaration in order to define mocks to that nested file.tap
, since currently this PR is just relying in a fork to run all tests, ref: Add mock API tapjs/tapjs#698