UNPKG

cypress-maildev

Version:

An easy-to-use cypress bunch of commands to use Maildev API for tests messages reception !

19 lines (18 loc) 804 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.register = void 0; var maildevCommands_1 = require("./maildevCommands"); var register = function (cypress) { var maildevCommands = new maildevCommands_1.MaildevCommands(); for (var _i = 0, _a = maildevCommands_1.MaildevCommands.cypressCommands; _i < _a.length; _i++) { var commandName = _a[_i]; cypress.Commands.add( // @ts-ignore The typing made by Cypress is not ideal // biome-ignore lint/suspicious/noExplicitAny: The typing made by Cypress is not ideal. commandName, // TS is not able to handle this trick, because it's a dirty trick ! // @ts-ignore maildevCommands[commandName].bind(maildevCommands)); } }; exports.register = register;