@@ -2,6 +2,7 @@ import { afterEach, describe, expect, test } from "bun:test";
22import { mkdirSync , mkdtempSync , rmSync , symlinkSync , writeFileSync } from "node:fs" ;
33import { tmpdir } from "node:os" ;
44import { join } from "node:path" ;
5+ import { platform } from "node:os" ;
56import { loadAppBootstrap } from "./loaders" ;
67import type { CliInput } from "./types" ;
78
@@ -144,7 +145,7 @@ describe("loadAppBootstrap", () => {
144145 ) ,
145146 ) ;
146147
147- expect ( bootstrap . changeset . sourceLabel ) . toBe ( dir ) ;
148+ expect ( bootstrap . changeset . sourceLabel . replace ( / \\ / g , "/" ) ) . toBe ( dir . replace ( / \\ / g , "/" ) ) ;
148149 expect ( bootstrap . changeset . files [ 0 ] ?. path ) . toBe ( "example.ts" ) ;
149150 expect ( bootstrap . changeset . files [ 0 ] ?. agent ?. annotations ) . toHaveLength ( 1 ) ;
150151 } ) ;
@@ -289,7 +290,7 @@ describe("loadAppBootstrap", () => {
289290 writeFileSync ( join ( dir , "tracked.ts" ) , "export const tracked = 1;\n" ) ;
290291 git ( dir , "add" , "tracked.ts" ) ;
291292 git ( dir , "commit" , "-m" , "initial" ) ;
292- git ( dir , "branch" , "main " ) ;
293+ git ( dir , "branch" , "base-branch " ) ;
293294
294295 writeFileSync ( join ( dir , "tracked.ts" ) , "export const tracked = 2;\n" ) ;
295296 git ( dir , "add" , "tracked.ts" ) ;
@@ -300,7 +301,7 @@ describe("loadAppBootstrap", () => {
300301
301302 const bootstrap = await loadFromRepo ( dir , {
302303 kind : "git" ,
303- range : "main " ,
304+ range : "base-branch " ,
304305 staged : false ,
305306 options : { mode : "auto" } ,
306307 } ) ;
@@ -317,7 +318,7 @@ describe("loadAppBootstrap", () => {
317318 writeFileSync ( join ( dir , "tracked.ts" ) , "export const tracked = 1;\n" ) ;
318319 git ( dir , "add" , "tracked.ts" ) ;
319320 git ( dir , "commit" , "-m" , "initial" ) ;
320- git ( dir , "branch" , "main " ) ;
321+ git ( dir , "branch" , "base-branch " ) ;
321322
322323 writeFileSync ( join ( dir , "tracked.ts" ) , "export const tracked = 2;\n" ) ;
323324 git ( dir , "add" , "tracked.ts" ) ;
@@ -328,7 +329,7 @@ describe("loadAppBootstrap", () => {
328329
329330 const bootstrap = await loadFromRepo ( dir , {
330331 kind : "git" ,
331- range : "main ..HEAD" ,
332+ range : "base-branch ..HEAD" ,
332333 staged : false ,
333334 options : { mode : "auto" } ,
334335 } ) ;
@@ -361,6 +362,10 @@ describe("loadAppBootstrap", () => {
361362 } ) ;
362363
363364 test ( "loads untracked files whose names need parser-safe diff headers" , async ( ) => {
365+ if ( platform ( ) === "win32" ) {
366+ return ;
367+ }
368+
364369 const dir = createTempRepo ( "hunk-git-quoted-untracked-" ) ;
365370
366371 writeFileSync ( join ( dir , "tracked.ts" ) , "export const tracked = 1;\n" ) ;
@@ -850,7 +855,7 @@ describe("loadAppBootstrap", () => {
850855 writeFileSync ( after , "export const answer = 42;\nexport const added = true;\n" ) ;
851856
852857 const diffProc = Bun . spawnSync (
853- [ "git" , "diff" , "--no-index" , "--color=always" , "--" , before , after ] ,
858+ [ "git" , "diff" , "--no-index" , "--color=always" , "--" , " before.ts" , " after.ts" ] ,
854859 {
855860 cwd : dir ,
856861 stdin : "ignore" ,
0 commit comments