-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Takeshi
committed
Feb 16, 2024
1 parent
1f38bfe
commit 656d279
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import exists from '../exists'; | ||
import clone from '../clone' | ||
import { rm } from 'shelljs' | ||
import { join } from 'path'; | ||
|
||
|
||
describe('utils/clone', () => { | ||
const destination = join(__dirname, 'output', 'clone', 'example') | ||
const options = { | ||
temp: join(__dirname, 'output', 'clone', '.gitcopy'), | ||
} | ||
|
||
beforeEach(async () => { | ||
rm('-rf', join(__dirname, 'output', 'clone', '.gitcopy')) | ||
}) | ||
afterEach(async () => { | ||
rm('-rf', destination) | ||
}) | ||
|
||
afterAll(async () => { | ||
rm('-rf', join(__dirname, 'output', 'clone', '.gitcopy')) | ||
}) | ||
it('should clone the repository', async () => { | ||
const result = await clone('lukeed/gittar', options) | ||
console.log(result) | ||
expect(await exists(result)).toBe(true) | ||
}) | ||
}) |