What needs testing
js/utils/performanceTracker.js needs test coverage. It is a utility for performance instrumentation, but currently has no associated tests in the repository.
Current coverage
Current test coverage for this file is 0% (there is no test file).
Proposed approach
I propose creating js/utils/tests/performanceTracker.test.js using the Jest framework to write a comprehensive test suite. The approach will cover:
- Toggling the enabled/disabled state (enable(), disable(), isEnabled()).
- Verifying the "no-op" behavior of tracking methods when the tracker is disabled.
- Testing the timing functions (startRun(), endRun(), getStats(), reset()).
- Testing depth tracking via enterBlock() and exitBlock(), including edge cases.
- Verifying console output logging logic fallback behavior.
- Verifying memory tracking gracefully handles missing
performance.memory support in environments like jsdom.
Checklist
📚 See Testing Guide for how to write block tests.
🙋🙋 Questions: Community Matrix Server.
What needs testing
js/utils/performanceTracker.js needs test coverage. It is a utility for performance instrumentation, but currently has no associated tests in the repository.
Current coverage
Current test coverage for this file is 0% (there is no test file).
Proposed approach
I propose creating js/utils/tests/performanceTracker.test.js using the Jest framework to write a comprehensive test suite. The approach will cover:
performance.memorysupport in environments like jsdom.Checklist
📚 See Testing Guide for how to write block tests.
🙋🙋 Questions: Community Matrix Server.