API Docs for:
Show:

Api Class

Uses
Defined in: lib/main.js:10
Module: TestHelpers

API test helper class: exports Loud class of ApiHelpers module

Item Index

Methods

Methods

methodsExposed

(
  • arrayofFnNames
  • apiObj
)
Test

Inherited from ApiLoud: lib/api.js:27

Is the api correctly exposed?

Checks that all keys in array are present on the object and are functions.

Parameters:

  • arrayofFnNames Array

    list of api methods that shd be exposed

  • apiObj Object

    object literal that contains api methods

Returns:

Test: tap.test function is returned

Example:

// 1 test shd fail; Object.twoPot is not exposed
require.('tap-test-helpers').Api.methodsExposed(['onePot', 'twoPot', 'threePot'], {
    'onePot': function(argument) {},
    'threePot': function(argument) {}
});