v0.72.0 - JestLite Documentation & Type Safety Improvements (2026-04-10)¶
What Changed?¶
This release improves the JestLite testing framework with better type safety for GAS script boundaries and comprehensive documentation updates. All matcher type checks now use constructor name comparison for robustness across script contexts, and docstrings follow TypeDoc best practices for clarity and beginner-friendliness.
What's New¶
GAS-Safe Type Checking in JestLite¶
What it does:
Improved toBeInstanceOf() and toThrow() matchers now use constructor name comparison instead of the instanceof operator.
This ensures type checks work reliably across Google Apps Script script boundaries, where instanceof can fail due to context switching.
Why this matters:
In GAS environments, classes referenced across different script scopes can appear as different constructors, causing instanceof checks to fail unexpectedly. The new approach compares constructor names directly, which is stable across scope boundaries.
Code example:
// Works reliably even across GAS script boundaries
expect(new Date()).toBeInstanceOf(Date);
expect(new CustomClass()).toBeInstanceOf(CustomClass);
expect(() => { throw new TypeError("error"); }).toThrow(TypeError);
Enhanced Documentation¶
All JestLite docstrings have been rewritten for clarity:
- Simplified interface descriptions
- Concise method documentation with clear examples
- All examples now use
javascript(not TypeScript) for GAS compatibility - Added
@remarkssections for important context and limitations
Added¶
Symbol.toStringTagsupport forExpect,Matcher, andTestSuiteclasses for accurate type identification viagetTypeOf()@remarkssections in matcher docstrings explaining GAS compatibility considerations
Changed¶
toBeInstanceOf()andtoThrow()now use constructor name comparison for GAS script boundary safety- Renamed
JestLiteLoggerOptionstoJestLiteOptionsfor more accurate naming (reflects both logger and AfterGlow configuration) - All JestLite docstrings rewritten for clarity, brevity, and beginner-friendliness
- Example code blocks changed from TypeScript to JavaScript for GAS compatibility
Fixed¶
toBeInstanceOf()now works reliably across GAS script boundariestoThrow()error type detection is now robust against context switching issues
Is It Safe to Upgrade?¶
- Breaking Changes: Yes (renamed
JestLiteLoggerOptionstoJestLiteOptions) - Backward Compatible: Mostly (type checking behavior is now more robust)
For users who explicitly import JestLiteLoggerOptions, you'll need to update imports to use JestLiteOptions instead.
Functional behavior is improved: type assertions now work correctly in GAS environments where they previously could fail.
No user code changes are needed if you don't explicitly reference the interface type.
Release Details¶
- Date: 2026-04-10
- Version: v0.72.0
- gaslamp: 133
- pilotlamp: 91
- Files Changed: 6 (jestlite module files)
- Commits:
9fbb3690- fix(jestlite): use constructor name comparison for instanceof checks (GAS compatibility)fc35e10d- docs(jestlite): improve docstring clarity and consistency481d2403- refactor(jestlite): rename JestLiteLoggerOptions to JestLiteOptions607bc140- feat(jestlite): add Symbol.toStringTag to classes for better type identification
Known Issues¶
None at this time.
Next Steps¶
Future releases will continue improving test framework robustness and expanding documentation coverage. Potential areas include additional matcher types, performance optimizations, and expanded GAS environment compatibility patterns.