mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Fix tests on win32 systems
This commit is contained in:
parent
f447356d81
commit
3aed7d14cf
1 changed files with 14 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ describe("CheckpointService", () => {
|
|||
let git: SimpleGit
|
||||
let testFile: string
|
||||
let service: CheckpointService
|
||||
let originalPlatform: string
|
||||
|
||||
const initRepo = async ({
|
||||
baseDir,
|
||||
|
|
@ -48,6 +49,19 @@ describe("CheckpointService", () => {
|
|||
return { git, testFile }
|
||||
}
|
||||
|
||||
beforeAll(() => {
|
||||
originalPlatform = process.platform
|
||||
Object.defineProperty(process, "platform", {
|
||||
value: "darwin",
|
||||
})
|
||||
})
|
||||
|
||||
afterAll(() => {
|
||||
Object.defineProperty(process, "platform", {
|
||||
value: originalPlatform,
|
||||
})
|
||||
})
|
||||
|
||||
beforeEach(async () => {
|
||||
const baseDir = path.join(os.tmpdir(), `checkpoint-service-test-${Date.now()}`)
|
||||
const repo = await initRepo({ baseDir })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue