Skip to content

Commit ee9ae8c

Browse files
committed
fix: make transaction-manager max retries test platform-specific
- Use invalid Windows file path characters on Windows platform - Use deeply nested non-existent path on Unix platforms - Ensures test failure condition is met on all platforms
1 parent 57210e2 commit ee9ae8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils/transaction-manager.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,11 @@ describe('TransactionManager', () => {
355355
it('should respect max retries', async () => {
356356
const manager = new TransactionManager({ maxRetries: 0 });
357357

358-
const invalidFile = join('/invalid/path/file.txt');
358+
// Use a path that should fail on all platforms - invalid characters
359+
const invalidFile = process.platform === 'win32'
360+
? 'C:\\invalid\\path\\with\\<>:"|?*\\file.txt' // Invalid Windows characters
361+
: '/invalid/non/existent/deeply/nested/path/file.txt'; // Non-existent deep path
362+
359363
manager.addFileCreate(invalidFile, 'content');
360364

361365
const result = await manager.execute();

0 commit comments

Comments
 (0)