mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Add ignored reftests
This commit is contained in:
parent
8f575a446d
commit
1c318ab607
@ -7,6 +7,11 @@ const slash = require('slash');
|
|||||||
const parseRefTest = require('./parse-reftest');
|
const parseRefTest = require('./parse-reftest');
|
||||||
const outputPath = 'tests/reftests.js';
|
const outputPath = 'tests/reftests.js';
|
||||||
|
|
||||||
|
const ignoredTests = [
|
||||||
|
'/tests/reftests/background/radial-gradient.html',
|
||||||
|
'/tests/reftests/text/chinese.html'
|
||||||
|
];
|
||||||
|
|
||||||
glob(
|
glob(
|
||||||
'../tests/reftests/**/*.html',
|
'../tests/reftests/**/*.html',
|
||||||
{
|
{
|
||||||
@ -21,10 +26,16 @@ glob(
|
|||||||
|
|
||||||
const testList = files.reduce((acc, filename) => {
|
const testList = files.reduce((acc, filename) => {
|
||||||
const refTestFilename = path.resolve(__dirname, filename.replace(/\.html$/, '.txt'));
|
const refTestFilename = path.resolve(__dirname, filename.replace(/\.html$/, '.txt'));
|
||||||
console.log(refTestFilename);
|
const name = `/${slash(path.relative('../', filename))}`;
|
||||||
acc[`/${slash(path.relative('../', filename))}`] = fs.existsSync(refTestFilename)
|
if (ignoredTests.indexOf(name) === -1) {
|
||||||
? parseRefTest(fs.readFileSync(refTestFilename).toString())
|
console.log(name);
|
||||||
: null;
|
acc[name] = fs.existsSync(refTestFilename)
|
||||||
|
? parseRefTest(fs.readFileSync(refTestFilename).toString())
|
||||||
|
: null;
|
||||||
|
} else {
|
||||||
|
console.log(`IGNORED: ${name}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user