riya_business_travel_7.5.5/packages/grafana-e2e/cypress/plugins/index.js
venbatechnologies@gmail.com 16f7870fa5 Initial commit
2021-07-05 12:44:38 +05:30

20 lines
713 B
JavaScript

const compareScreenshots = require('./compareScreenshots');
const extendConfig = require('./extendConfig');
const readProvisions = require('./readProvisions');
const typescriptPreprocessor = require('./typescriptPreprocessor');
module.exports = (on, config) => {
on('file:preprocessor', typescriptPreprocessor);
on('task', { compareScreenshots, readProvisions });
on('task', {
log({ message, optional }) {
optional ? console.log(message, optional) : console.log(message);
return null;
},
});
// Always extend with this library's config and return for diffing
// @todo remove this when possible: https://github.com/cypress-io/cypress/issues/5674
return extendConfig(config);
};