node-zugferd icon indicating copy to clipboard operation
node-zugferd copied to clipboard

Idea for Output Validation Testing

Open kellertobias opened this issue 1 year ago • 3 comments

Here's an Idea on how you could add output validation testing to your project. We are using the java library "mustang" - you need to have java installed, the jar file is downloaded automatically during test setup.

Alternatively we could implement this using testcontainers (and the setup installed in there).

Here you could add multiple scenarios and validate their output.

Just a quick draft, nothing sophisticated

kellertobias avatar Jul 13 '25 13:07 kellertobias

Edit: oh, I didn't see that you have already installed a testing framework in a subfolder. You of course could move the tests down there.

kellertobias avatar Jul 13 '25 13:07 kellertobias

Open in StackBlitz

npm i https://pkg.pr.new/jslno/node-zugferd/@node-zugferd/api@86
npm i https://pkg.pr.new/jslno/node-zugferd@86

commit: 240af47

pkg-pr-new[bot] avatar Jul 13 '25 13:07 pkg-pr-new[bot]

Thanks, this was very helpful! I ended up taking a slightly different approach to support third-party validators outside of tests as well. Once #105 is more stable and merged, I’ll plan to close this PR.

jslno avatar Aug 07 '25 11:08 jslno