0.1.7 • Published 2 years ago

@truffle/expect v0.1.7

Weekly downloads
2,555
License
MIT
Repository
github
Last release
2 years ago

@truffle/expect

Simple module for ensuring expected parameters exist

install

$ npm install @truffle/expect

Usage

const expect = require("@truffle/expect");

// the object you're testing
const options = {
  example: "exists",
  another: 5
};

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

expect.one(options, ["example", "optional_key"]); // does nothing because at least one key value exists
expect.one(options, ["optional_key", "other_optional_key"]); // errors because both key values are undefined
0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

3 years ago

0.1.2

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.0.19

3 years ago

0.1.0

3 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.14-next.0

5 years ago

0.1.0-tezos.0

5 years ago

0.0.13

6 years ago

0.0.13-next.1

6 years ago

0.0.13-next.0

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago