Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
This is a tiny assertion library (in the same space as
require("assert")
) that is only a handful of lines, and exports a
simple API.
var ist = require("ist")
ist([] instanceof Array) // Assert that the argument is truthy
ist(1 + 1, 2) // Assert that two values are the same
ist(1 + 1, 3, "<") // Assert that 2 is less than 3
ist(a, b, myCompareFunc) // Pass an arbitrary compare function
ist.throws(function() { undefined.prop }) // Ensure something throws
ist
(value)
Throws a exception of class ist.Failure
when value
is falsy.
ist
(a, b, compare)
Compares a
and b
, and throws an ist.Failure
if the comparison
fails. compare
defaults to ==
, but you can pass a string that
corresponds to a JavaScript comparison operator, or a custom function,
to compare in a different way.
ist.throws
(f, matches)
Ensure that calling f
throws an exception, and optionally test
whether the exception matches your expectation. matches
may be a
regexp, which is matched against the exception's message
property, a
string, which should be the same as the message
, or a function that
takes an exception and returns a boolean.
This software is licensed under an MIT license.
FAQs
Mini assertion library
The npm package ist receives a total of 9,637 weekly downloads. As such, ist popularity was classified as popular.
We found that ist demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.