mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-22 23:20:24 -05:00
43c8ae2a7c
Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
33 lines
974 B
JavaScript
33 lines
974 B
JavaScript
exports['webpack-file install template correctly generates plugins config when webpack config path is missing 1'] = `
|
|
const injectDevServer = require("@cypress/react/plugins/load-webpack");
|
|
|
|
const something = require("something");
|
|
|
|
module.exports = (on, config) => {
|
|
if (config.testingType === "component") {
|
|
injectDevServer(on, config, {
|
|
// TODO replace with valid webpack config path
|
|
webpackFileName: './webpack.config.js'
|
|
});
|
|
}
|
|
|
|
return config; // IMPORTANT to return a config
|
|
};
|
|
`
|
|
|
|
exports['webpack-file install template correctly generates plugins config when webpack config path is provided 1'] = `
|
|
const injectDevServer = require("@cypress/react/plugins/load-webpack");
|
|
|
|
const something = require("something");
|
|
|
|
module.exports = (on, config) => {
|
|
if (config.testingType === "component") {
|
|
injectDevServer(on, config, {
|
|
webpackFileName: 'config/webpack.config.js'
|
|
});
|
|
}
|
|
|
|
return config; // IMPORTANT to return a config
|
|
};
|
|
`
|