UNPKG

@vph-garage/sails-interfuser

Version:

Automizing injection of your [custom Sails.JS] hook's MVC logics (models, controllers, helpers, services, config, policies, views, and assets) from the hook's directory [presuming default structure], or specified directories, into the end-product, Sails.J

15 lines (12 loc) 454 B
module.exports = async function testHelper (title, helperName) { context(`${helperName} helper :: ${title}:`, async function () { it(`has ${helperName} helper`, async function (){ expect(sails.helpers[helperName]).to.be.a('function'); // sails.log.debug(sails.helpers); }); it(`can invoke helper ${helperName}`, async function (){ let ret = await sails.helpers[helperName](); expect(ret).to.be.ok; }); }); }