JavaScript files inside the ./pdfs
directory are picked up automatically and their result is compared to their .pdf counterparts.
There will be false negatives.
Ideas for a better PDF testing setup are welcome.
Run specific tests:
node --harmony-async-await test/index.js test/pdfs/text/*.js
Additional PDF validation could be done using preflight:
java -classpath ./preflight-app-2.0.4.jar org.apache.pdfbox.preflight.Validator_A1b ./test.pdf
Use all results as future expectations:
rename -f 's/\.result\.pdf$/\.pdf/' test/pdfs/**/*.pdf