add coverage

This commit is contained in:
Rene Haas
2022-10-21 13:49:02 +02:00
parent 302d3dd021
commit ac714a5f85
13 changed files with 207 additions and 16 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = function (config) {
coverageReporter: {
dir: require('path').join(__dirname, './.coverage'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'text-summary' }],
reporters: [{ type: 'json' }, { type: 'text' }],
},
reporters: ['progress', 'kjhtml'],
port: 9876,
+1 -1
View File
@@ -36,6 +36,6 @@
},
"scripts": {
"build": "ng build overlayscrollbars-ngx",
"test": "ng test --watch=false --sourceMap=false --browsers=ChromeHeadless"
"test": "ng test --watch=false --sourceMap=false --browsers=ChromeHeadless --code-coverage"
}
}
@@ -34,6 +34,6 @@
"build": "run-p build-js build-types",
"build-js": "vite build",
"build-types": "tsc --emitDeclarationOnly -p tsconfig.types.json",
"test": "vitest run"
"test": "vitest run --coverage"
}
}
@@ -2,13 +2,7 @@
"name": "overlayscrollbars-svelte",
"private": true,
"version": "0.4.0",
"scripts": {
"build": "svelte-kit sync && svelte-package",
"test": "vitest run --environment jsdom",
"prepublishOnly": "echo 'Did you mean to publish `./package/`, instead of `./`?' && exit 1",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"type": "module",
"peerDependencies": {
"svelte": "^3.44.0"
},
@@ -24,5 +18,11 @@
"tslib": "^2.3.1",
"typescript": "^4.7.4"
},
"type": "module"
"scripts": {
"build": "svelte-kit sync && svelte-package",
"test": "vitest run --coverage",
"prepublishOnly": "echo 'Did you mean to publish `./package/`, instead of `./`?' && exit 1",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
}
}
@@ -1,6 +1,6 @@
import { describe, it, expect, afterEach } from 'vitest';
import { cleanup, render } from '@testing-library/svelte';
import OverlayScrollbarsComponent from '~/OverlayScrollbarsComponent.svelte';
import { OverlayScrollbarsComponent } from '~/overlayscrollbars-svelte';
describe('Hello.svelte', () => {
// TODO: @testing-library/svelte claims to add this automatically but it doesn't work without explicit afterEach
+1 -1
View File
@@ -34,7 +34,7 @@
},
"scripts": {
"build": "run-p build-js build-types",
"test": "vitest run",
"test": "vitest run --coverage",
"build-js": "vite build",
"build-types": "vue-tsc --emitDeclarationOnly -p tsconfig.types.json --composite false"
}
-2
View File
@@ -9,5 +9,3 @@
# Node
/node_modules
# Miscellaneous
/.coverage