test: make lockfile path assertion cross-platform

This commit is contained in:
suger
2026-04-09 01:37:27 +08:00
parent 22480302c3
commit ea344ad036

View File

@@ -1,3 +1,4 @@
import { join } from 'node:path'
import { describe, expect, test } from 'bun:test' import { describe, expect, test } from 'bun:test'
import { import {
buildLockfilePayload, buildLockfilePayload,
@@ -26,7 +27,7 @@ describe('lockfile helpers', () => {
try { try {
expect(getLockfilePath(4567)).toBe( expect(getLockfilePath(4567)).toBe(
'D:\\tmp\\claude-config\\ide\\4567.lock', join('D:/tmp/claude-config', 'ide', '4567.lock'),
) )
} finally { } finally {
if (originalConfigDir === undefined) { if (originalConfigDir === undefined) {