mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
Add Cypress code coverage using Istanbul nyc  --------- Co-authored-by: shelly_goldblit <shelly_goldblit@dell.com> Co-authored-by: Harel M <harel.mazor@gmail.com>
34 lines
733 B
TypeScript
34 lines
733 B
TypeScript
import replace from "@rollup/plugin-replace";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
import istanbul from "vite-plugin-istanbul";
|
|
|
|
export default defineConfig({
|
|
server: {
|
|
port: 8888,
|
|
},
|
|
build: {
|
|
sourcemap: true
|
|
},
|
|
plugins: [
|
|
replace({
|
|
preventAssignment: true,
|
|
include: /\/jsonlint-lines-primitives\/lib\/jsonlint.js/,
|
|
delimiters: ["", ""],
|
|
values: {
|
|
"_token_stack:": "",
|
|
},
|
|
}) as any,
|
|
react(),
|
|
istanbul({
|
|
cypress: true,
|
|
requireEnv: false,
|
|
nycrcPath: "./.nycrc.json",
|
|
forceBuildInstrument: true, //Instrument the source code for cypress runs
|
|
}),
|
|
],
|
|
define: {
|
|
global: "window",
|
|
},
|
|
});
|