File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/web/src/features/git Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ vi.mock('@sourcebot/shared', () => ({
1010 getRepoPath : ( repo : { id : number } ) => ( {
1111 path : `/mock/cache/dir/${ repo . id } ` ,
1212 } ) ,
13+ createLogger : ( ) => ( {
14+ debug : vi . fn ( ) ,
15+ info : vi . fn ( ) ,
16+ warn : vi . fn ( ) ,
17+ error : vi . fn ( ) ,
18+ } ) ,
1319} ) ) ;
1420vi . mock ( '@/lib/serviceError' , ( ) => ( {
1521 unexpectedError : ( message : string ) => ( {
@@ -20,6 +26,10 @@ vi.mock('@/lib/serviceError', () => ({
2026 errorCode : 'NOT_FOUND' ,
2127 message,
2228 } ) ,
29+ invalidGitRef : ( ref : string ) => ( {
30+ errorCode : 'INVALID_GIT_REF' ,
31+ message : `Invalid git reference: "${ ref } ". Git refs cannot start with '-'.` ,
32+ } ) ,
2333} ) ) ;
2434vi . mock ( '@/actions' , ( ) => ( {
2535 sew : async < T > ( fn : ( ) => Promise < T > | T ) : Promise < T > => {
You can’t perform that action at this time.
0 commit comments