A simple TDD assertion library, initially designed for Thallium, but factored out as a separate module for use elsewhere. It's also modular, with its core factored out into clean-assert-util
so you can write your own assertions that look just like this one, without any hassle and without declaring a direct dependency on this (that package is much more stable).
Install via npm:
npm install --save clean-assert
See here.
See the tests. This assertion framework uses itself to test.
Found a bug? Want a feature? Report it here! Want to contribute? Keep reading.
ESLint with my preset is used to lint, and Mocha is used to run the tests. Most of the source code is in lib/
, and the tests are all in test/
.
The implementation is generally composed of a combination of DSLs to avoid a large amount of repetition, since most of the assertions fit the mold of "type check, test something, then throw an error if it failed".
Copyright (c) 2016 and later, Isiah Meadows [email protected].
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.