Compare commits

...

3 Commits

Author SHA1 Message Date
shelly_goldblit 1fc4e7bfd1 remove coverage from git 2023-12-25 11:07:47 +02:00
shelly_goldblit 0811c0d911 add coverage output to git ignore 2023-12-25 07:14:15 +02:00
shelly_goldblit 9f8d1fd0eb add code coverage 2023-12-25 06:44:31 +02:00
7 changed files with 884 additions and 70 deletions
+1
View File
@@ -14,6 +14,7 @@ lib-cov
# Coverage directory used by tools like istanbul # Coverage directory used by tools like istanbul
coverage coverage
.nycoutput
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt .grunt
+27
View File
@@ -0,0 +1,27 @@
{
"all": true,
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false,
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": [
"cypress/**/*.*",
"**/*.d.ts",
"**/*.cy.tsx",
"**/*.cy.ts",
"./coverage/**",
"./cypress/**",
"./dist/**",
"**/*.cy.ts",
"./lighthouse/**",
"./e2e-coverage/**",
"./unit-coverage/**",
"./src/environments/**",
"**/*@globalwebindex/**",
"./config/jest/**",
"./public/vendor/**",
"./scripts/**",
"node_modules"
],
"report-dir": "coverage",
"reporter": ["json", "lcov", "json-summary"]
}
+7
View File
@@ -1,9 +1,16 @@
import { defineConfig } from "cypress"; import { defineConfig } from "cypress";
export default defineConfig({ export default defineConfig({
env: {
codeCoverage: {
exclude: "cypress/**/*.*",
},
},
e2e: { e2e: {
setupNodeEvents(on, config) { setupNodeEvents(on, config) {
// implement node event listeners here // implement node event listeners here
require("@cypress/code-coverage/task")(on, config);
return config;
}, },
retries: { retries: {
runMode: 2, runMode: 2,
+1
View File
@@ -14,6 +14,7 @@
// *********************************************************** // ***********************************************************
// Import commands.js using ES2015 syntax: // Import commands.js using ES2015 syntax:
import "@cypress/code-coverage/support";
import "cypress-plugin-tab"; import "cypress-plugin-tab";
import "./commands"; import "./commands";
+829 -61
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -85,6 +85,8 @@
} }
}, },
"devDependencies": { "devDependencies": {
"@cypress/code-coverage": "^3.12.15",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@rollup/plugin-replace": "^5.0.5", "@rollup/plugin-replace": "^5.0.5",
"@shellygo/cypress-test-utils": "^2.0.9", "@shellygo/cypress-test-utils": "^2.0.9",
"@storybook/addon-a11y": "^7.6.5", "@storybook/addon-a11y": "^7.6.5",
@@ -131,6 +133,7 @@
"stylelint-scss": "^4.2.0", "stylelint-scss": "^4.2.0",
"typescript": "^5.3.3", "typescript": "^5.3.3",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"vite": "^5.0.0" "vite": "^5.0.0",
"vite-plugin-istanbul": "^5.0.0"
} }
} }
+14 -7
View File
@@ -1,21 +1,28 @@
import { defineConfig } from "vite"; import replace from "@rollup/plugin-replace";
import react from "@vitejs/plugin-react"; 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({ export default defineConfig({
server: { server: {
port: 8888 port: 8888,
}, },
plugins: [ plugins: [
replace({ replace({
preventAssignment: true, preventAssignment: true,
include: /\/jsonlint-lines-primitives\/lib\/jsonlint.js/, include: /\/jsonlint-lines-primitives\/lib\/jsonlint.js/,
delimiters: ['', ''], delimiters: ["", ""],
values: { values: {
'_token_stack:': '' "_token_stack:": "",
} },
}) as any, }) as any,
react() react(),
istanbul({
cypress: true,
requireEnv: false,
nycrcPath: "./.nycrc.json",
forceBuildInstrument: true, //Instrument the source code for cypress runs
}),
], ],
define: { define: {
global: "window", global: "window",