This package has been deprecated

    Author message:

    WARNING: This package has been renamed to @truffle/expect.

    truffle-expect

    0.0.9 • Public • Published

    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

    Install

    npm i truffle-expect

    DownloadsWeekly Downloads

    225

    Version

    0.0.9

    License

    MIT

    Unpacked Size

    3.74 kB

    Total Files

    5

    Last publish

    Collaborators

    • kevinbluer
    • tenthirtyone
    • lsqproduction
    • kevinweaver
    • leeftk
    • tcoulter
    • gnidan
    • davidmurdoch
    • eggplantzzz
    • fainashalts
    • haltman
    • rkalis
    • cds-amal
    • micaiahreid