0.0.9 • Published 5 years ago

truffle-expect v0.0.9

Weekly downloads
354
License
MIT
Repository
github
Last release
5 years ago

truffle-expect

Simple module for ensuring expected parameters exist

install

$ npm install truffle-expect

Usage

var expect = require("truffle-expect");

// The object you're testing
var options = {
  example: "exists"
  another: 5
};

expect.options(options, ["example", "another"]); // does nothing
expect.options(options, ["example", "another", "some_other_key"]); // errors because options["some_other_key"] is undefined