docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a test event monitoring utility that tracks and logs QUnit test execution events in real-time. This utility should capture various stages of test execution and provide detailed reporting information.
Create a monitoring system that:
Tracks Test Suite Beginning: Captures when the entire test suite starts running and logs the total number of tests scheduled to execute.
Monitors Individual Test Execution: For each test that runs, records:
Captures Test Results: For each completed test, logs whether it:
Collects Detailed Failure Information: When tests fail, captures:
Reports Suite Completion: When all tests finish, logs:
/**
* Initializes the test event monitor
* Sets up event listeners for QUnit lifecycle hooks
* @param {Object} qunit - The QUnit instance to monitor
*/
function initMonitor(qunit);
/**
* Returns collected monitoring data
* @returns {Object} Object containing arrays of events captured during test execution
*/
function getMonitorData();
/**
* Clears all collected monitoring data
*/
function clearMonitorData();
module.exports = {
initMonitor,
getMonitorData,
clearMonitorData
};Provides the QUnit testing framework with test lifecycle event hooks.