Development setup for testing?
I have, so far, seen no automated testing (the
Quench module implies that someone has some testing but I have yet to see any in the wild---and the irony that the quench module itself contains no test is not lost on me).So, does anyone use automated tests? If so, what and how?
I guess I want to check that I'm not missing something obvious and in danger of 'reinventing the wheel' before I go too far down this path.
Current thinking
For integration/end-end testing I currently my plan is to use
docker to run up test instances of FoundryVTT. The 'module under test' being mounted into the modules directory and a modeJS script to use Setup.installPackage to recursively install dependent packages and game system (with options to specify additional installs). Create test world etc. either through code, snapshot, or using UI driver (Playwright). Then run integration/end-to-end test suits (mocha for integration, Playwright for end-to-end).Unit testing is simpler as it does not require Foundry or dependencies.
This configuration should allow automated testing (especially for CI) and, importantly, allow me to easily test the impact when dependencies update.
