1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-12-17 12:22:17 +03:00
Files
nginx-proxy-manager/test/cypress/plugins/index.js
2025-11-18 07:21:06 +10:00

22 lines
638 B
JavaScript

const { SwaggerValidation } = require('@jc21/cypress-swagger-validation');
const chalk = require('chalk');
module.exports = (on, config) => {
// Replace swaggerBase config var wildcard
if (typeof config.env.swaggerBase !== 'undefined') {
config.env.swaggerBase = config.env.swaggerBase.replace('{{baseUrl}}', config.baseUrl);
}
// Plugin Events
on('task', SwaggerValidation(config));
on('task', require('./backendApi/task')(config));
on('task', {
log(message) {
console.log(`${chalk.cyan.bold('[')}${chalk.blue.bold('LOG')}${chalk.cyan.bold(']')} ${chalk.red.bold(message)}`);
return null;
}
});
return config;
};