(filename: string)
| 761 | it('should set shutdown flag when closing', async () => { |
| 762 | // Create mock file transports with once/end methods for proper flush handling |
| 763 | const createMockFileTransport = (filename: string) => { |
| 764 | const transport = { |
| 765 | filename, |
| 766 | once: vi.fn((event: string, callback: () => void) => { |
| 767 | // Immediately call the callback to simulate finish event |
| 768 | if (event === 'finish') { |
| 769 | setImmediate(callback); |
| 770 | } |
| 771 | }), |
| 772 | on: vi.fn(), |
| 773 | off: vi.fn(), |
| 774 | end: vi.fn(), |
| 775 | }; |
| 776 | Object.setPrototypeOf(transport, winstonMock.transports.File.prototype); |
| 777 | return transport; |
| 778 | }; |
| 779 | |
| 780 | const mockFileTransport1 = createMockFileTransport('/mock/path/debug.log'); |
| 781 | const mockFileTransport2 = createMockFileTransport('/mock/path/error.log'); |
no outgoing calls
no test coverage detected
searching dependent graphs…