Skip to content

Commit

Permalink
Handle windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Takeshi committed Feb 16, 2024
1 parent 671e804 commit ee05c88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/__test__/archive.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import parse from '../parse'
import { getUrl } from '../archive'
import { getArchivePath } from '../archive'
const isWin32 = process.platform === 'win32'

describe('utils/archive', () => {
describe('getUrl()', () => {
Expand Down Expand Up @@ -40,7 +41,8 @@ describe('utils/archive', () => {
describe('getArchivePath()', () => {
it('should return a path to the zipped file', () => {
expect(getArchivePath(parse('iwatakeshi/test'))).toEqual(
expect.stringMatching(/\.gitly\/github\/iwatakeshi\/test\/master\.tar\.gz/)
isWin32 ? expect.stringMatching(/\.gitly\\github\\iwatakeshi\\test\\master\.tar\.gz/) :
expect.stringMatching(/\.gitly\/github\/iwatakeshi\/test\/master\.tar\.gz/)
)
})
})
Expand Down

0 comments on commit ee05c88

Please sign in to comment.