smartstring/test/test.git.ts

27 lines
919 B
TypeScript
Raw Permalink Normal View History

import * as smartstring from '../ts/index';
import { tap, expect } from '@pushrocks/tapbundle';
2017-10-05 13:55:59 +00:00
// git
let testGit: smartstring.GitRepo;
2017-10-05 13:55:59 +00:00
tap.test('expect create a new Git class GitRepo', async () => {
testGit = new smartstring.GitRepo('git+https://github.com/pushrocks/smartstring.git');
expect(testGit).be.instanceof(smartstring.GitRepo);
});
2017-10-05 13:55:59 +00:00
tap.test('expect return a .host', async () => {
expect(testGit.host).equal('github.com');
});
2017-10-05 13:55:59 +00:00
tap.test('expect return a .user', async () => {
expect(testGit.user).equal('pushrocks');
});
2017-10-05 13:55:59 +00:00
tap.test('expect return a .repo', async () => {
expect(testGit.repo).equal('smartstring');
});
2017-10-05 13:55:59 +00:00
tap.test('expect return a .httpsUrl', async () => {
expect(testGit.httpsUrl).equal('https://github.com/pushrocks/smartstring.git');
});
2017-10-05 13:55:59 +00:00
tap.test('expect return a .sshUrl', async () => {
expect(testGit.sshUrl).equal('git@github.com:pushrocks/smartstring.git');
});
2017-10-05 13:55:59 +00:00
tap.start();