Node TAP 19.0.2

tap Asserts Plugin


Tap plugin that adds a heaping pile of assertion methods. Pretty much all of the "test" methods other than t.pass,, and snapshot methods come from this plugin.


This plugin is installed with tap by default. If you had previously removed it, you can tap plugin add @tapjs/asserts to bring it back.


This plugin adds the compareOptions option to the set of fields that can be passed to child tests. You can also set t.compareOptions after the fact.

compareOptions lets you pass options to tcompare to specify the formatting style, diff context lines, and so on.

It can contain the following fields:

Assertion Methods#

All of the assertion methods are documented on the Assertions class. When this plugin is loaded, these are all present on Test objects.