Skip to content

Conversation

@blikblum
Copy link
Member

Implement tests for rendered pages. Uses jest framework.

Initially added simple tests to discuss the code structure, so more can be added later.

Also added a test with the output generated by a pdfmake basics example (trapped pdfkit calls and exported them). The same process can be done with the remaining examples or other pdfkit based libraries

Another idea (not implemented yet) is to store a reference pdf file for each test and create a new one when test does not match. Useful for visualizing the difference

@zoosky
Copy link

zoosky commented Aug 9, 2018

Nice !

@blikblum blikblum changed the title [WIP] Implement tests Implement integration tests Aug 12, 2018
@blikblum
Copy link
Member Author

blikblum commented Aug 12, 2018

This is basically done.

It tests the pdf generated by scripts based on pdfkit demos and from pdfmake. It uses jest snapshots and also creates reference pdf file, and eventually the changed one, in __pdfs__ directory.

It would still need to create unit tests (per classes) but its enough to convert to ES6 with good confidence

@blikblum
Copy link
Member Author

Superseded by #859

@blikblum blikblum closed this Nov 30, 2018
@blikblum blikblum deleted the add-tests branch February 16, 2019 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants