add code coverage (#852)

Add Cypress code coverage using Istanbul nyc

![image](https://github.com/maputnik/editor/assets/60476837/e7c364b7-7b54-4bf1-85aa-ee6fb19cc40c)

---------

Co-authored-by: shelly_goldblit <shelly_goldblit@dell.com>
Co-authored-by: Harel M <harel.mazor@gmail.com>
This commit is contained in:
ShellyDCMS
2023-12-26 12:04:43 +02:00
committed by GitHub
parent 656264f2bc
commit a324ddb654
9 changed files with 1678 additions and 32 deletions
+18 -8
View File
@@ -1,23 +1,33 @@
import { defineConfig } from "vite";
import replace from "@rollup/plugin-replace";
import react from "@vitejs/plugin-react";
import replace from '@rollup/plugin-replace';
import { defineConfig } from "vite";
import istanbul from "vite-plugin-istanbul";
export default defineConfig({
server: {
port: 8888
port: 8888,
},
build: {
sourcemap: true
},
plugins: [
replace({
preventAssignment: true,
include: /\/jsonlint-lines-primitives\/lib\/jsonlint.js/,
delimiters: ['', ''],
delimiters: ["", ""],
values: {
'_token_stack:': ''
}
"_token_stack:": "",
},
}) as any,
react()
react(),
istanbul({
cypress: true,
requireEnv: false,
nycrcPath: "./.nycrc.json",
forceBuildInstrument: true, //Instrument the source code for cypress runs
}),
],
define: {
global: "window",
},
});
});