Socket
Book a DemoInstallSign in
Socket

@tapjs/synonyms

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tapjs/synonyms

extend the @tapjs/asserts methods with various aliases

latest
Source
npmnpm
Version
4.3.0
Version published
Maintainers
2
Created
Source

@tapjs/synonyms

This plugin provides a lot of aliases for various assertion methods.

USAGE

This plugin is not included in tap by default. Add it by running tap plugin add @tapjs/synonyms.

Once added:

import t from 'tap'

// If you can guess it, it's probably what you'd think.
t.isEqual(1 + 2, 3)

History

When node-tap was originally written, there were several different test and assertion frameworks (including node's built-in assert module) that all had subtly different naming conventions.

Test libraries in JavaScript at the time were often ported from other languages like Ruby or Perl, which had different naming conventions, and they sometimes preserved those conventions.

I had the ""bright"" idea to just not have an opinion, and say "whatever, JavaScript makes method aliasing easy, why not support all of them?" This turned out to be a regrettable choice, but despite years of deprecation, these methods do still exist in tests out in the wild. So the way forward is to move the aliases completely out of tap's core feature set into a plugin.

If you want it, opt into it.

Keywords

tapjs plugin

FAQs

Package last updated on 01 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts