Added test ci test results

This commit is contained in:
Kevin R
2020-09-10 00:58:38 +02:00
parent 68f10ac9ac
commit 7ea819d26a
5 changed files with 136 additions and 65 deletions

View File

@@ -70,12 +70,14 @@ test:addon:
dependencies:
- install dependencies
script:
- npm test
- npm run test:ci
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
artifacts:
when: always
paths:
- coverage
reports:
junit: junit.xml
expire_in: 30 days
bundle addon:

View File

@@ -1,4 +1,5 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
preset: 'ts-jest',
testEnvironment: 'node',
reporters: ["default", "jest-junit"]
};

25
junit.xml Normal file
View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="jest tests" tests="9" failures="0" time="7.098">
<testsuite name="RuleTest" errors="0" failures="0" skipped="0" timestamp="2020-09-09T22:58:11" time="4.561" tests="3">
<testcase classname="RuleTest should create correct RegExp" name="RuleTest should create correct RegExp" time="0.001">
</testcase>
<testcase classname="RuleTest should return correct value on toString" name="RuleTest should return correct value on toString" time="0">
</testcase>
<testcase classname="RuleTest should be set active value correctly" name="RuleTest should be set active value correctly" time="0.001">
</testcase>
</testsuite>
<testsuite name="CircularBuffer" errors="0" failures="0" skipped="0" timestamp="2020-09-09T22:58:11" time="4.561" tests="6">
<testcase classname="CircularBuffer should creates a buffer with the specified capacity" name="CircularBuffer should creates a buffer with the specified capacity" time="0.001">
</testcase>
<testcase classname="CircularBuffer should add item to the buffer" name="CircularBuffer should add item to the buffer" time="0">
</testcase>
<testcase classname="CircularBuffer should remove oldest item if the buffer is full on adding new items" name="CircularBuffer should remove oldest item if the buffer is full on adding new items" time="0.001">
</testcase>
<testcase classname="CircularBuffer should return the current size via the size() getter" name="CircularBuffer should return the current size via the size() getter" time="0">
</testcase>
<testcase classname="CircularBuffer should return true if buffer is empty" name="CircularBuffer should return true if buffer is empty" time="0">
</testcase>
<testcase classname="CircularBuffer should throw exception on illegal argument" name="CircularBuffer should throw exception on illegal argument" time="0.008">
</testcase>
</testsuite>
</testsuites>

41
package-lock.json generated
View File

@@ -5604,6 +5604,41 @@
}
}
},
"jest-junit": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-11.1.0.tgz",
"integrity": "sha512-c2LFOyKY7+ZxL5zSu+WHmHfsJ2wqbOpeYJ4Uu26yMhFxny2J2NQj6AVS7M+Eaxji9Q/oIDDK5tQy0DGzDp9xOw==",
"dev": true,
"requires": {
"mkdirp": "^1.0.4",
"strip-ansi": "^5.2.0",
"uuid": "^3.3.3",
"xml": "^1.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
}
},
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"dev": true
}
}
},
"jest-leak-detector": {
"version": "26.4.0",
"resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.4.0.tgz",
@@ -10775,6 +10810,12 @@
"integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==",
"dev": true
},
"xml": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz",
"integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=",
"dev": true
},
"xml-name-validator": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",

View File

@@ -1,63 +1,65 @@
{
"name": "clearurls",
"version": "1.19.0",
"description": "Remove tracking elements from URLs",
"main": "background/main.js",
"dependencies": {
"webext-options-sync": "^1.2.3",
"webextension-polyfill-ts": "^0.19.0"
},
"devDependencies": {
"@sindresorhus/tsconfig": "^0.7.0",
"@types/firefox-webext-browser": "^78.0.1",
"@types/jest": "^26.0.10",
"@types/node": "^14.6.0",
"copy-webpack-plugin": "^6.0.3",
"dot-json": "^1.2.0",
"jest": "^26.4.0",
"mockzilla-webextension": "^0.6.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"size-plugin": "^2.0.1",
"terser-webpack-plugin": "^4.1.0",
"ts-jest": "^26.2.0",
"ts-loader": "^8.0.2",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"typescript": "^3.9.7",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
},
"scripts": {
"lint": "tslint -t codeFrame -c tslint.json 'source/**/*.{ts,tsx,js}' 'tests/**/*.{ts,tsx,js}'",
"test": "jest --coverage",
"test:prod": "run-s test lint build",
"clean": "rimraf distribution",
"build": "run-s clean && webpack --mode=production",
"watch": "webpack --mode=development --watch",
"version": "dot-json manifest.json version $VER"
},
"repository": {
"type": "git",
"url": "git@gitlab.com:KevinRoebert/ClearUrls.git"
},
"keywords": [
"tracking-protection",
"webextension",
"plugin",
"opensource",
"firefox addon",
"chrome addon",
"edge addon",
"browser extension",
"extension"
],
"author": "Kevin Röbert",
"license": "LGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/KevinRoebert/ClearUrls/issues"
},
"homepage": "https://github.com/KevinRoebert/ClearUrls#readme"
"name": "clearurls",
"version": "1.19.0",
"description": "Remove tracking elements from URLs",
"main": "background/main.js",
"dependencies": {
"webext-options-sync": "^1.2.3",
"webextension-polyfill-ts": "^0.19.0"
},
"devDependencies": {
"@sindresorhus/tsconfig": "^0.7.0",
"@types/firefox-webext-browser": "^78.0.1",
"@types/jest": "^26.0.10",
"@types/node": "^14.6.0",
"copy-webpack-plugin": "^6.0.3",
"dot-json": "^1.2.0",
"jest": "^26.4.0",
"jest-junit": "^11.1.0",
"mockzilla-webextension": "^0.6.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"size-plugin": "^2.0.1",
"terser-webpack-plugin": "^4.1.0",
"ts-jest": "^26.2.0",
"ts-loader": "^8.0.2",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"typescript": "^3.9.7",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
},
"scripts": {
"lint": "tslint -t codeFrame -c tslint.json 'source/**/*.{ts,tsx,js}' 'tests/**/*.{ts,tsx,js}'",
"test": "jest --coverage",
"test:ci": "jest --ci --coverage --testResultsProcessor=\"jest-junit\"",
"test:prod": "run-s test lint build",
"clean": "rimraf distribution",
"build": "run-s clean && webpack --mode=production",
"watch": "webpack --mode=development --watch",
"version": "dot-json manifest.json version $VER"
},
"repository": {
"type": "git",
"url": "git@gitlab.com:KevinRoebert/ClearUrls.git"
},
"keywords": [
"tracking-protection",
"webextension",
"plugin",
"opensource",
"firefox addon",
"chrome addon",
"edge addon",
"browser extension",
"extension"
],
"author": "Kevin Röbert",
"license": "LGPL-3.0-or-later",
"bugs": {
"url": "https://github.com/KevinRoebert/ClearUrls/issues"
},
"homepage": "https://github.com/KevinRoebert/ClearUrls#readme"
}