testdriverai 7.3.30 → 7.3.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [7.3.32](https://github.com/testdriverai/testdriverai/compare/v7.3.31...v7.3.32) (2026-02-20)
2
+
3
+
4
+
5
+ ## [7.3.31](https://github.com/testdriverai/testdriverai/compare/v7.3.30...v7.3.31) (2026-02-20)
6
+
7
+
8
+
1
9
  ## [7.3.30](https://github.com/testdriverai/testdriverai/compare/v7.3.29...v7.3.30) (2026-02-20)
2
10
 
3
11
 
@@ -175,12 +175,31 @@ function setupConsoleSpy(client, taskId) {
175
175
 
176
176
  /**
177
177
  * Unregister a client so its sandbox no longer receives forwarded logs.
178
- * When the last client is removed the spy stays installed (harmless) so we
179
- * never have to worry about restore-order races with concurrent tests.
178
+ * When the last client is removed we restore the original console methods so
179
+ * the Vitest worker fork can exit cleanly (unreleased vi.spyOn mocks prevent
180
+ * the worker from shutting down, producing "Worker exited unexpectedly").
181
+ * If another test starts later (e.g. a retry), installConsoleSpy() will
182
+ * re-install the spy on demand.
180
183
  * @param {import('../../sdk.js').default} client - TestDriver client instance
181
184
  */
182
185
  function cleanupConsoleSpy(client) {
183
186
  _consoleSpy.activeClients.delete(client);
187
+
188
+ // Restore spies when no tests need them — allows clean worker exit
189
+ if (_consoleSpy.activeClients.size === 0 && _consoleSpy.spies) {
190
+ _consoleSpy.spies.log.mockRestore();
191
+ _consoleSpy.spies.error.mockRestore();
192
+ _consoleSpy.spies.warn.mockRestore();
193
+ _consoleSpy.spies.info.mockRestore();
194
+ _consoleSpy.spies = null;
195
+ _consoleSpy.originals = null;
196
+ _consoleSpy.installed = false;
197
+
198
+ if (debugConsoleSpy) {
199
+ process.stdout.write("[DEBUG cleanupConsoleSpy] All spies restored\n");
200
+ }
201
+ }
202
+
184
203
  if (debugConsoleSpy) {
185
204
  process.stdout.write(
186
205
  `[DEBUG cleanupConsoleSpy] clients remaining: ${_consoleSpy.activeClients.size}\n`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "7.3.30",
3
+ "version": "7.3.32",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "sdk.js",
6
6
  "types": "sdk.d.ts",