mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
deps: update dependencies with lint fixes (#2565)
This commit is contained in:

committed by
GitHub

parent
e7a021ab93
commit
b2902ec31c
@ -21,7 +21,7 @@ const outputPath = resolve(__dirname, '../', process.argv[3]);
|
||||
const ignoredTests = readFileSync(path)
|
||||
.toString()
|
||||
.split(/\r\n|\r|\n/)
|
||||
.filter(l => l.length)
|
||||
.filter((l) => l.length)
|
||||
.reduce((acc: {[key: string]: string[]}, l) => {
|
||||
const m = l.match(/^(\[(.+)\])?(.+)$/i);
|
||||
if (m) {
|
||||
|
@ -17,7 +17,7 @@ const files = readdirSync(path);
|
||||
interface RefTestMetadata {}
|
||||
|
||||
interface RefTestSingleMetadata extends RefTestMetadata {
|
||||
test: string;
|
||||
test?: string;
|
||||
}
|
||||
|
||||
interface RefTestResults {
|
||||
@ -26,12 +26,14 @@ interface RefTestResults {
|
||||
|
||||
const result: RefTestResults = files.reduce((result: RefTestResults, file) => {
|
||||
const json: RefTestSingleMetadata = JSON.parse(readFileSync(resolve(__dirname, path, file)).toString());
|
||||
if (!result[json.test]) {
|
||||
result[json.test] = [];
|
||||
}
|
||||
if (json.test) {
|
||||
if (!result[json.test]) {
|
||||
result[json.test] = [];
|
||||
}
|
||||
|
||||
result[json.test].push(json);
|
||||
delete json.test;
|
||||
result[json.test].push(json);
|
||||
delete json.test;
|
||||
}
|
||||
|
||||
return result;
|
||||
}, {});
|
||||
|
Reference in New Issue
Block a user