0.1.7 • Published 8 months ago

@truffle/expect v0.1.7

Weekly downloads
2,555
License
MIT
Repository
github
Last release
8 months 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

8 months ago

0.1.6

11 months ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.2

2 years ago

0.1.3

2 years ago

0.1.1

2 years ago

0.0.19

2 years ago

0.1.0

2 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.14-next.0

4 years ago

0.1.0-tezos.0

4 years ago

0.0.13

4 years ago

0.0.13-next.1

5 years ago

0.0.13-next.0

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago