chai-interface
chai assertions about an object's interface
installation
$ npm install chai-interface
usage
var chai = chai chai var foo = bar: true baz: 'green' qux: 37 {} ducks: 1 2 3 fooshouldhave
Also, more complex, nested objects!
var user = name: first: 'Betty' last: 'Dodson' emails: work: 'b.dodson@megacorp.com' home: 'butterflychica947@lol.com' school: 'bdodso4@stateu.edu' usershouldhave
example error message
Interface not as expected:
{
"bars": {
"actual": "Array<String>",
"expected": "Array<Number>",
"actualValue": [
"a",
"b",
"c"
]
}
}
tracery
by the power ofchai-interface
does interface checking using tracery
contributors
jden jason@denizac.org @leJDen
Please submit pull requests and issues through github.
license
MIT (c) 2013 Agile Diagnosis, Inc. see LICENSE.md