Add testing config.

This commit is contained in:
Bauke 2022-10-05 15:07:07 +02:00
parent 173b1e25f5
commit ee1d72362f
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
3 changed files with 609 additions and 2 deletions

View File

@ -11,7 +11,7 @@
"build:chromium": "VITE_BROWSER=chromium vite build && web-ext build -n re-nav-chromium-{version}.zip -s build/chromium",
"build:firefox": "VITE_BROWSER=firefox vite build && web-ext build -n re-nav-firefox-{version}.zip -s build/firefox",
"zip-source": "git archive --format zip --output web-ext-artifacts/re-nav-source.zip HEAD",
"test": "xo && stylelint 'source/**/*.scss' && tsc"
"test": "xo && stylelint 'source/**/*.scss' && tsc && c8 ava"
},
"dependencies": {
"@holllo/migration-helper": "^0.1.3",
@ -25,18 +25,54 @@
"@preact/preset-vite": "^2.4.0",
"@types/babel__core": "^7.1.19",
"@types/webextension-polyfill": "^0.9.1",
"ava": "^4.3.3",
"c8": "^7.12.0",
"postcss": "^8.4.16",
"sass": "^1.55.0",
"stylelint": "^14.13.0",
"stylelint-config-standard-scss": "^5.0.0",
"trash-cli": "^5.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.8.4",
"vite": "^3.1.4",
"vite-plugin-web-extension": "^1.4.4",
"web-ext": "^7.2.0",
"xo": "^0.52.3"
},
"ava": {
"extensions": [
"ts"
],
"files": [
"tests/**/*.test.ts"
],
"require": [
"ts-node/register"
],
"snapshotDir": "tests/snapshots"
},
"c8": {
"include": [
"source",
"tests"
],
"reportDir": "coverage",
"reporter": [
"text",
"html"
]
},
"xo": {
"overrides": [
{
"files": "tests/**/*.test.ts",
"rules": {
"@typescript-eslint/triple-slash-reference": "off",
"import/extensions": "off",
"no-await-in-loop": "off"
}
}
],
"prettier": true,
"rules": {
"@typescript-eslint/consistent-type-definitions": "off",

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,12 @@
},
"include": [
"source/**/*.ts",
"tests/**/*.ts",
"vite.config.ts"
]
],
"ts-node": {
"compilerOptions": {
"module": "CommonJS"
}
}
}