T-16: M0.1b — Make repo-wide bun test green: fix queue, shutdown-signal and research-workflow test failures

This commit is contained in:
Studio 2026-11-27 12:01:06 -05:00
parent 890761e0d5
commit 9c4e87cdfd
17 changed files with 366 additions and 266 deletions

View file

@ -6,14 +6,15 @@ describe('Shutdown Comprehensive Tests', () => {
beforeEach(() => {
// Reset singleton instance for each test
(Shutdown as any).instance = null;
Shutdown.reset();
// Create a fresh instance for each test
shutdownInstance = new Shutdown({ autoRegister: false });
});
afterEach(() => {
// Clean up singleton
(Shutdown as any).instance = null;
// Clean up singleton and any signal listeners
shutdownInstance?.dispose();
Shutdown.reset();
});
describe('Basic Functionality', () => {
@ -250,10 +251,18 @@ describe('Shutdown Comprehensive Tests', () => {
});
it('should use default timeout', () => {
const _defaultShutdown = new Shutdown();
const defaultShutdown = new Shutdown();
let secondShutdown: Shutdown | undefined;
// Can't directly test timeout value, but we can verify it doesn't throw
expect(() => new Shutdown()).not.toThrow();
try {
// Can't directly test timeout value, but we can verify it doesn't throw
expect(() => {
secondShutdown = new Shutdown();
}).not.toThrow();
} finally {
defaultShutdown.dispose();
secondShutdown?.dispose();
}
});
});
});