Skip to content

Enhanced PDF Test Reporting #3805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
node_modules/
coverage/
npm-debug.log
test/actual/*.pdf
2,110 changes: 1,780 additions & 330 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"docdash": "^1.2.0",
"eslint": "^7.4.0",
"eslint-plugin-jasmine": "^4.1.1",
"express": "^4.18.2",
"folder-delete": "^1.0.4",
"inquirer": "^6.5.2",
"jasmine": "3.5.0",
Expand All @@ -64,8 +65,9 @@
"karma-coverage": "2.0.2",
"karma-firefox-launcher": "1.3.0",
"karma-ie-launcher": "1.0.0",
"karma-jasmine": "3.3.1",
"karma-jasmine": "^3.3.1",
"karma-jasmine-matchers": "4.0.2",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "2.2.5",
"karma-rollup-preprocessor": "^7.0.7",
"karma-sauce-launcher": "4.1.5",
Expand All @@ -74,6 +76,7 @@
"local-web-server": "^4.2.1",
"log-utils": "^1.0.0",
"markdown": "0.5.0",
"nodemon": "^3.1.9",
"preprocess": "^3.2.0",
"prettier": "^1.19.1",
"regenerator-runtime": "^0.13.5",
Expand All @@ -85,6 +88,7 @@
"rollup-plugin-preprocess": "0.0.4",
"rollup-plugin-terser": "^6.1.0",
"typescript": "^5.6.2",
"webpack": "^5.97.1",
"yarpm": "^0.2.1"
},
"scripts": {
Expand All @@ -107,7 +111,8 @@
"prettier": "prettier --write \"*.{js,ts,md,css,json}\" \"{spec,examples,src,types}/**/*.{js,ts,md,css,json}\"",
"lint": "prettier --check \"*.{js,ts,md,css,json}\" \"{spec,examples,src,types}/**/*.{js,ts,md,css,json}\"",
"pregenerate-docs": "node deletedocs.js",
"generate-docs": "jsdoc -c jsdoc.json --readme README.md"
"generate-docs": "jsdoc -c jsdoc.json --readme README.md",
"test-report": "node test/report/server.js"
},
"browserslist": [
"last 2 versions",
Expand Down
Empty file added test/actual/.gitkeep
Empty file.
21 changes: 21 additions & 0 deletions test/report/generate-report-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const fs = require('fs');
const path = require('path');

function generateReportData(testResults) {
// Pass through the test results directly since they're already in the correct format
return testResults;
}

function writeReportData(data) {
const reportDir = path.join(__dirname);
const dataFile = path.join(reportDir, 'test-results.js');

const content = `window.TEST_RESULTS = ${JSON.stringify(data, null, 2)};`;

fs.writeFileSync(dataFile, content);
}

module.exports = {
generateReportData,
writeReportData
};
Loading
Loading