Api Class
API test helper class: exports Loud class of ApiHelpers module
Item Index
Methods
Methods
methodsExposed
(
Test
-
arrayofFnNames -
apiObj
Is the api correctly exposed?
Checks that all keys in array are present on the object and are functions.
Parameters:
-
arrayofFnNamesArraylist of api methods that shd be exposed
-
apiObjObjectobject 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) {}
});
