mirror of
https://github.com/maputnik/editor.git
synced 2026-07-31 18:27:28 +00:00
add code coverage (#852)
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>
This commit is contained in:
+18
-8
@@ -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",
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user