1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-06-11 04:41:39 +03:00
Files
nginx-proxy-manager/test/cypress/plugins/index.js
Jamie Curnow f48e1b46a8 Updated swagger cypress package,
which works with proxies
2024-10-16 08:32:49 +10:00

21 lines
513 B
JavaScript

const { SwaggerValidation } = require('@jc21/cypress-swagger-validation');
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(message);
return null;
}
});
return config;
};