Skip to content

wrwrwr/chai-oequal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chai-oequal

Chai plugin that defines an oequal() method for objects with a custom equality notion.

Overview

Suppose your objects know how to compare themselves:

Then you may shorten the following:

as:

Installation and usage

Install using npm:

And use with Node.js:

You may also load the plugin with a script tag or using define().

To change the default method name called to check objects equality:

Or to override it for a single test:

About

A Chai plugin that provides an oequal() method using object's equality method instead of ===.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published