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

Inheriting from Tap #443

Closed
ericmorand opened this issue May 11, 2018 · 2 comments · May be fixed by pke/node-tap#52 or pke/node-tap#53
Closed

Inheriting from Tap #443

ericmorand opened this issue May 11, 2018 · 2 comments · May be fixed by pke/node-tap#52 or pke/node-tap#53

Comments

@ericmorand
Copy link
Contributor

Is there a way to inherit from the Tap class to add some custom assertions?

I'd like to do that:

const tap = require('tap');

tap.test('foo', function(test) {
    test.customAssertion();
    test.end();
});
@isaacs
Copy link
Member

isaacs commented May 14, 2018

You could do this by using the addAssert method.

@isaacs isaacs closed this as completed May 14, 2018
@ericmorand
Copy link
Contributor Author

Amazing. How did I miss that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants