1. @tapjs/asserts
Tap plugin that adds a heaping pile of assertion methods. Pretty much all of the "test" methods other than `t.pass`, `t.fail`, and [snapshot methods](https://tapjs.github.io/tapjs/modules/_tapjs_snapshot.html) come from this plugin.
@tapjs/asserts
Package: @tapjs/asserts
Created by: tapjs
Last modified: Tue, 26 Mar 2024 23:27:16 GMT
Version: 1.1.20
License: BlueOak-1.0.0
Downloads: 121,048
Repository: https://github.com/tapjs/tapjs

Install

npm install @tapjs/asserts
yarn add @tapjs/asserts

@tapjs/asserts

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

come from this plugin.

USAGE

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.

compareOptions

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:

  • sort - boolean, sort items alphabetically by key.
  • bufferChunkSize - number of bytes to show on each line when
    printing buffers, default 32
  • includeEnumerable - boolean, include any and all enumerable
    properties, including those inherited on the prototype chain.
    By default, only own properties are shown.
  • includeGetters - boolean, include getter properties.
  • diffContext - how many lines of context to print around
    changes in diffs, default 10. Note that the test reporter
    might use more or less than this value when displaying pretty
    colored diffs.

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.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code