expect-methods

Assert that some object carries all the methods you expect.

Usage no npm install needed!

<script type="module">
  import expectMethods from 'https://cdn.skypack.dev/expect-methods';
</script>

README



expect-methods

Assert that some object carries all the methods you expect.

API

This module exports one function:

expectMethods(obj, names[, opts])

names should be an array of method names you expect to see on obj. opts is an optional options object that supports these keys:

  • descr: Description of what obj is.

Known issues

  • Needs more/better tests and docs.

 

License

ISC