smartgit/test/test.ts

25 lines
881 B
TypeScript
Raw Normal View History

2019-06-18 13:17:50 +00:00
import { tap, expect } from '@pushrocks/tapbundle';
import * as smartgit from '../ts/index';
2016-06-12 14:46:59 +00:00
2019-06-20 12:10:42 +00:00
import * as path from 'path';
let testSmartgitInstance: smartgit.Smartgit;
2019-06-20 12:10:42 +00:00
const testRepoDir = path.join(__dirname, '../.nogit/testrepo');
const testRepoDirSmartfile = path.join(__dirname, '../.nogit/pushrocks_smartfile')
tap.test('should create a valid smartgit instance', async () => {
testSmartgitInstance = new smartgit.Smartgit();
await testSmartgitInstance.init();
expect(testSmartgitInstance).to.be.instanceOf(smartgit.Smartgit);
})
2019-06-20 12:10:42 +00:00
tap.test('should create a new repo at .nogit', async () => {
const gitRepo = await testSmartgitInstance.createRepoByOpen(testRepoDir);
});
tap.test('should clone a repo', async () => {
const gitRepo = await testSmartgitInstance.createRepoByClone('https://gitlab.com/pushrocks/smartfile.git', testRepoDirSmartfile);
2020-08-15 13:46:56 +00:00
});
2019-06-20 12:10:42 +00:00
2019-06-18 13:17:50 +00:00
tap.start();