truffle-expect
Simple module for ensuring expected parameters exist
install
$ npm install truffle-expect
Usage
const expect = ; // the object you're testingconst options = example: "exists" another: 5; expectoptionsoptions "example" "another"; // does nothing because both key values existexpectoptionsoptions "example" "another" "some_other_key"; // errors because options["some_other_key"] is undefined expect; // does nothing because at least one key value existsexpect; // errors because both key values are undefined