import { defineConfig } from 'cypress';
import createBundler from '@bahmutov/cypress-esbuild-preprocessor';
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor';
import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild';
...
async setupNodeEvents(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions): Promise<Cypress.PluginConfigOptions> {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; // otherwise, remotes with self-signed certificates are rejected.
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await addCucumberPreprocessorPlugin(on, config);
const bundler = createBundler({
plugins: [
NodeModulesPolyfills(),
GlobalsPolyfills({
process: true,
buffer: true
}),
createEsbuildPlugin(config)
]
});
on('file:preprocessor', bundler);
Trying to pull my repo packages and node up, but getting this in ci/cd
Docker:
Dependencies:
cypress config
import { defineConfig } from 'cypress'; import createBundler from '@bahmutov/cypress-esbuild-preprocessor'; import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'; import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild';
...