UNPKG

gitly

Version:

An API to download and/or extract git repositories

27 lines (26 loc) 1.02 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const exists_1 = __importDefault(require("../exists")); const clone_1 = __importDefault(require("../clone")); const shelljs_1 = require("shelljs"); const node_path_1 = require("node:path"); describe('utils/clone', () => { const options = { temp: (0, node_path_1.join)(__dirname, 'output', 'clone'), backend: 'git', throws: true }; beforeAll(() => { (0, shelljs_1.rm)('-rf', (0, node_path_1.join)(__dirname, 'output', 'clone')); }); afterAll(() => { (0, shelljs_1.rm)('-rf', (0, node_path_1.join)(__dirname, 'output', 'clone')); }); it('should clone the repository', async () => { const result = await (0, clone_1.default)('iwatakeshi/gitly', options); expect(await (0, exists_1.default)(result)).toBe(true); }); });