Skip to content

Commit 69d0f06

Browse files
committed
Make debug log test path portable
1 parent f1a4e90 commit 69d0f06

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/cli/lib/tests/debug-log.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { appendFileSync } from 'fs';
22
import { tmpdir } from 'os';
3+
import { join } from 'path';
34
import { beforeEach, describe, expect, it, vi } from 'vitest';
45

56
vi.mock( 'fs', () => {
@@ -52,7 +53,7 @@ describe( 'createDebugLogger', () => {
5253
logger.log( 'todo_tool_use_received', { input: 'test' } );
5354

5455
expect( logger.enabled ).toBe( false );
55-
expect( logger.path ).toBe( '/tmp/studio-tests/studio-ai-debug.log' );
56+
expect( logger.path ).toBe( join( '/tmp/studio-tests', 'studio-ai-debug.log' ) );
5657
expect( appendFileSync ).not.toHaveBeenCalled();
5758
} );
5859

@@ -70,7 +71,7 @@ describe( 'createDebugLogger', () => {
7071

7172
expect( logger.enabled ).toBe( true );
7273
expect( appendFileSync ).toHaveBeenCalledWith(
73-
'/tmp/studio-tests/studio-ai-debug.log',
74+
join( '/tmp/studio-tests', 'studio-ai-debug.log' ),
7475
JSON.stringify( {
7576
timestamp: '2026-03-12T10:00:00.000Z',
7677
scope: 'todo-rendering',

0 commit comments

Comments
 (0)