chai-fuzzy
chai-fuzzy copied to clipboard
fuzzy matchers for chai, based on underscore
Test case: ``` js var chai = require('chai'); chai.use(require('chai-fuzzy')); var expect = chai.expect(); function Document() {} var actual = new Document(); actual.foo = 1; actual.bar = 2; var expected =...
At the top of the index.js (line 3), chai-fuzzy checks for the presence of "require" as a function. If it is not defined, it calls it anyway (line 32).
Todo: learn how hook into chai's chaining to allow something like: ``` javascript expect(['a','b','c']).to.have.one.like('a'); expect({}).to.be.json.of({}); ```
Look into a phantomjs runner for mocha and add that to the test makefile target