forked from eslint/eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcypress.config.js
More file actions
50 lines (48 loc) · 1.03 KB
/
Copy pathcypress.config.js
File metadata and controls
50 lines (48 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"use strict";
const { defineConfig } = require("cypress");
const path = require("node:path");
const webpack = require("webpack");
const webpackPreprocessor = require("@cypress/webpack-preprocessor");
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
module.exports = defineConfig({
e2e: {
setupNodeEvents(on) {
on(
"file:preprocessor",
webpackPreprocessor({
webpackOptions: {
mode: "none",
resolve: {
alias: {
"../../../lib/linter$": "../../../build/eslint",
},
},
plugins: [
new webpack.NormalModuleReplacementPlugin(
/^node:/u,
resource => {
resource.request = resource.request.replace(
/^node:/u,
"",
);
},
),
new NodePolyfillPlugin(),
],
stats: "errors-only",
},
}),
);
},
specPattern: path.join(
__dirname,
"tests",
"lib",
"linter",
"linter.js",
),
supportFile: false,
reporter: "progress",
screenshotOnRunFailure: false,
},
});