summaryrefslogtreecommitdiffstats
path: root/test/git.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-03-23 23:18:15 +0100
committerSamy Pessé <samypesse@gmail.com>2015-03-23 23:18:15 +0100
commit2d1aa15af8ee73f7179e323493ab4f6c40f6ac57 (patch)
treea71b44c602077c411b77cad554b0b47840294cfd /test/git.js
parent63ee94ff89d10e56d82079183c494f8129b92eae (diff)
downloadgitbook-2d1aa15af8ee73f7179e323493ab4f6c40f6ac57.zip
gitbook-2d1aa15af8ee73f7179e323493ab4f6c40f6ac57.tar.gz
gitbook-2d1aa15af8ee73f7179e323493ab4f6c40f6ac57.tar.bz2
New cleaner helper for testing
Diffstat (limited to 'test/git.js')
-rw-r--r--test/git.js32
1 files changed, 0 insertions, 32 deletions
diff --git a/test/git.js b/test/git.js
deleted file mode 100644
index 9d48606..0000000
--- a/test/git.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var path = require('path');
-var _ = require('lodash');
-var assert = require('assert');
-
-var fs = require("fs");
-var git = require("../lib/utils/git");
-
-describe('GIT parser and getter', function () {
- it('should correctly parse an https url', function() {
- var parts = git.parseUrl("git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test.md");
- assert(parts);
- assert.equal(parts.host, "https://gist.github.com/69ea4542e4c8967d2fa7.git");
- assert.equal(parts.ref, "master");
- assert.equal(parts.filepath, "test.md");
- });
-
- it('should correctly parse an https url with a reference', function() {
- var parts = git.parseUrl("git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test.md#0.1.2");
- assert(parts);
- assert.equal(parts.host, "https://gist.github.com/69ea4542e4c8967d2fa7.git");
- assert.equal(parts.ref, "0.1.2");
- assert.equal(parts.filepath, "test.md");
- });
-
- it('should correctly parse an ssh url', function() {
- var parts = git.parseUrl("git+git@github.com:GitbookIO/gitbook.git/directory/README.md#e1594cde2c32e4ff48f6c4eff3d3d461743d74e1");
- assert(parts);
- assert.equal(parts.host, "git@github.com:GitbookIO/gitbook.git");
- assert.equal(parts.ref, "e1594cde2c32e4ff48f6c4eff3d3d461743d74e1");
- assert.equal(parts.filepath, "directory/README.md");
- });
-});