immutable-class-tester
Advanced tools
Weekly downloads
Readme
A little library to facilitate the testing of immutable classes.
This library is really just a set of templates and testing tools to allow for quick construction of immutable classes.
Immutable Class provides one testing function for testing potential immutable classes: testImmutableClass
It is used like so:
testImmutableClass(MyImmutableClassConstructor, [
{ "potential": 1 }
{ "distinct": 2 }
{ "js": 3 }
{ "immutable classes": 4 }
]);
This function will then try to call fromJS
on each candidate and run it through a series of tests to ensure that it
corresponds to the rules above. It will also do an equality check of every object with every other object and make sure
that it only equals itself.
For an example of the usage of this library look at these files: source, tests.
FAQs
A helper for testing immutable classes
The npm package immutable-class-tester receives a total of 535 weekly downloads. As such, immutable-class-tester popularity was classified as not popular.
We found that immutable-class-tester demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.