ruipin / fvtt-lib-wrapper

Library for Foundry VTT which provides module developers with a simple way to modify core Foundry VTT code, while reducing the likelihood of conflict with other modules.
GNU Lesser General Public License v3.0
35 stars 15 forks source link

Port all test cases to CallOrderChecker #12

Closed ruipin closed 3 years ago

ruipin commented 3 years ago

Commit https://github.com/ruipin/fvtt-lib-wrapper/commit/26f097024a37b2b088514117809a6b3f75dd231b implements checker CallOrderChecker which allows automatic checking of wrapper call order, including detailed validation of argument passing, return values, and this. It also helps make unit tests much more readable.

Before: https://github.com/ruipin/fvtt-lib-wrapper/blob/8cddf9f593e8587739fa3f9269ca7b55a775b07e/tests/test_wrapper.js After: https://github.com/ruipin/fvtt-lib-wrapper/blob/26f097024a37b2b088514117809a6b3f75dd231b/tests/test_wrapper.js

These changes allowed me to easily find bug #13.

As such, the remaining test cases (e.g. test_lib.js) should be ported to use this checker.

ruipin commented 3 years ago

This is now done.