Releases: DAndrewBox/GM-Testing-Library
Releases · DAndrewBox/GM-Testing-Library
v1.2
GameMaker's Testing Library 
Major changes
- Added
simulateAsyncEvent(event_number, data, [inst_id])- fires any GameMaker async event (HTTP, Save/Load, Dialog, etc.) synchronously during a test with a fakeasync_loadmap built from a struct. Allows testing of async event handlers without real network calls or file I/O. Use the newasync_load_mapmacro as a drop-in replacement forasync_loadin your handlers - it returns the realasync_loadin normal builds and the simulated map during tests, transparently. Issue #1 - Added
.toThrow([message])matcher - asserts that a function throws when called, with an optional substring match on the thrown message. Issue #5 - Added
spy(fn)helper and.toHaveBeenCalled(),.toHaveBeenCalledTimes(n),.toHaveBeenCalledWith(args)matchers - wrap any function withspy()to track how many times it was called and with which arguments. Issue #5 - Nested
beforeEachandafterEachhooks now execute correctly across describe scopes. Outer hooks run before inner hooks (outer → inner forbeforeEach, inner → outer forafterEach), matching Jest/Vitest behaviour. Issue #11 beforeAllandafterAllare now properly scoped perdescribeblock. Each describe level runs its ownbeforeAllonce before its first test andafterAllafter all its tests complete. Issue #11
Minor changes
- Added function-level coverage reporting. Enable with
gmtl_show_coverage = trueinGMTL_definitions.gml. After all tests finish, a report is printed to the debug console showing which named functions were exercised. Coverage is tracked when a function reference is passed toexpect(fn, args). InternalGMTL_scripts are excluded automatically; user scripts are always scanned. - Since the amount of tests increased a lot from previous release, the demo output panel is now scrollable with the mouse wheel and displays a scrollbar on the right edge.
- Coverage reported output by default on the GameMaker's built-in console
Bug Fixes
- Fix an issue where mouse positions where not following camera positions after running tests PR #12 by @hazzard993
- Fix an issue where nested
beforeEachhooks were overwriting the parent scope'sbeforeEachinstead of stacking, causing only the innermost hook to execute. Issue #11 - Fix an issue where
beforeAllwould never fire when declared inside adescribeblock. Issue #11
New Contributors
- @hazzard993 made their first contribution in #12
If you have any feature request, issue, comment or suggestion, please let me know in the issues tab!
Full Changelog: v1.1.1...v1.2
gmtl-v1.1.1c
GameMaker's Testing Library 
Major changes
No major changes introduced in this update
Minor changes
No minor changes introduced in this update
Bug Fixes
- Fix an issue where inputs that could be simulated were not recognized if
gmtl_run_at_startwas false. (#10)
If you have any feature request, issue, comment or suggestion, please let me know in the issues tab!
Full Changelog: v1.1.1...v1.1.1c
gmtl-v1.1.1b
GameMaker's Testing Library 
Major changes
No major changes introduced in this update
Minor changes
- Improved performance in the
keyboard_*functions. - Some internal functions logic changed slightly.
Bug Fixes
- Fix all feather issues introduced in the last version.
- Fix an issue related to the
simulateKeyPress()where as functionsio_clear()andkeyboard_clear()were not removing the mocked key states. - Fix an issue with the "release" state in keyboard virtual keys due to changes in the last version.
If you have any feature request, issue, comment or suggestion, please let me know in the issues tab!
Full Changelog: v1.1.0...v1.1.1
gmtl-v1.1.0
GameMaker's Testing Library 
Major changes
- Added new simulation functions
simulateTimesourceandsimulateCallLaterthat virtually simulates time_source_* and call_later functions inside tests. - Changed internally how
simulateKey*andsimulateGamepadButton*functions work to support multiple key/button being press at the same time and improve performance outside tests. - Added new user manageable variable definitions to set if GMTL should run at game start, and the frames GTML should wait before running in
Libraries/GMTL/Setup/GMTL_definitions. - Dropped support for GameMaker versions 2023.1.x to 2023.3.x. Only versions 2023.4+ will be supported in the future.
Minor changes
- Updated Demo draw object to show text colors that match test statuses.
- Updated Demo tests to implement newer features.
- Updated documentation/wiki and README to match new changes.
- Small changes in the way tests are logged in the output windows.
- Some code for a new "code coverage" feature has been introduced in this release but it's not available to use yet since it contain bugs related to how GameMaker handles sandboxing. This feature should hopefully be released in v1.2.0.
Fixes
- Issues with library importing
GMTL_Definitionsfile as blank should be solved by now. (#2) - Fix documentation issues with
toBeEqual()method being calledtoBe(). (#3)
If you have any feature request, issue, comment or suggestion, please let me know in the issues tab!
Full Changelog: v1.0.0...v1.1.0
gmtl-v1.0.0-beta
gmtl-v1.0.0-stable
Release v1.0.0-stable