Skip to content

Commit

Permalink
Untitled commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore03109 committed Dec 6, 2023
1 parent 3ca0838 commit c2f88d4
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/services/db/__tests__/GitFileSystemService.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ describe("GitFileSystemService", () => {
checkIsRepo: jest.fn().mockResolvedValueOnce(true),
})

const result = await GitFileSystemService.isGitInitialized("fake-repo")
const result = await GitFileSystemService.isGitInitialized(
"fake-repo",
true
)

expect(result._unsafeUnwrap()).toBeTrue()
})
Expand All @@ -258,7 +261,10 @@ describe("GitFileSystemService", () => {
checkIsRepo: jest.fn().mockResolvedValueOnce(false),
})

const result = await GitFileSystemService.isGitInitialized("fake-repo")
const result = await GitFileSystemService.isGitInitialized(
"fake-repo",
true
)

expect(result._unsafeUnwrap()).toBeFalse()
})
Expand Down Expand Up @@ -288,7 +294,8 @@ describe("GitFileSystemService", () => {
})

const result = await GitFileSystemService.isOriginRemoteCorrect(
"fake-repo"
"fake-repo",
true
)

expect(result._unsafeUnwrap()).toBeTrue()
Expand All @@ -304,7 +311,8 @@ describe("GitFileSystemService", () => {
})

const result = await GitFileSystemService.isOriginRemoteCorrect(
"fake-repo"
"fake-repo",
true
)

expect(result._unsafeUnwrap()).toBeFalse()
Expand All @@ -316,7 +324,8 @@ describe("GitFileSystemService", () => {
})

const result = await GitFileSystemService.isOriginRemoteCorrect(
"fake-repo"
"fake-repo",
true
)

expect(result._unsafeUnwrapErr()).toBeInstanceOf(GitFileSystemError)
Expand Down Expand Up @@ -515,7 +524,8 @@ describe("GitFileSystemService", () => {

const result = await GitFileSystemService.getGitBlobHash(
"fake-repo",
"fake-dir/fake-file"
"fake-dir/fake-file",
true
)

expect(result._unsafeUnwrap()).toBe("fake-hash")
Expand All @@ -528,7 +538,8 @@ describe("GitFileSystemService", () => {

const result = await GitFileSystemService.getGitBlobHash(
"fake-repo",
"fake-dir/fake-file"
"fake-dir/fake-file",
true
)

expect(result._unsafeUnwrapErr()).toBeInstanceOf(GitFileSystemError)
Expand Down

0 comments on commit c2f88d4

Please sign in to comment.