summaryrefslogtreecommitdiffstats
path: root/lib/utils
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-05-11 13:02:20 +0200
committerSamy Pesse <samypesse@gmail.com>2016-05-11 13:02:24 +0200
commitef589a6b133ac67a7904f8bb2cbec42c96dec914 (patch)
treed505c567cd80b0681bbf5f7b46b2a25ed591e28a /lib/utils
parentd5c4af337795ca5c3d4e6f516aeaef15d51c4e8c (diff)
downloadgitbook-ef589a6b133ac67a7904f8bb2cbec42c96dec914.zip
gitbook-ef589a6b133ac67a7904f8bb2cbec42c96dec914.tar.gz
gitbook-ef589a6b133ac67a7904f8bb2cbec42c96dec914.tar.bz2
Switch tests to mocha while keeping jest structure
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/__tests__/git.js6
-rw-r--r--lib/utils/__tests__/location.js4
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/utils/__tests__/git.js b/lib/utils/__tests__/git.js
index 90555b6..abc1ea1 100644
--- a/lib/utils/__tests__/git.js
+++ b/lib/utils/__tests__/git.js
@@ -15,8 +15,8 @@ describe('Git', function() {
expect(Git.isUrl('git+git@github.com:GitbookIO/gitbook.git/directory/README.md#e1594cde2c32e4ff48f6c4eff3d3d461743d74e1')).toBeTruthy();
// Non valid
- expect(Git.isUrl('https://github.com/Hello/world.git')).not.toBeTruthy();
- expect(Git.isUrl('README.md')).not.toBeTruthy();
+ expect(Git.isUrl('https://github.com/Hello/world.git')).toBeFalsy();
+ expect(Git.isUrl('README.md')).toBeFalsy();
});
it('should parse HTTPS urls', function() {
@@ -45,7 +45,7 @@ describe('Git', function() {
});
describe('Cloning and resolving', function() {
- pit('should clone an HTTPS url', function() {
+ it('should clone an HTTPS url', function() {
var git = new Git(path.join(os.tmpdir(), 'test-git-'+Date.now()));
return git.resolve('git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test.md')
.then(function(filename) {
diff --git a/lib/utils/__tests__/location.js b/lib/utils/__tests__/location.js
index 1d75751..2d01714 100644
--- a/lib/utils/__tests__/location.js
+++ b/lib/utils/__tests__/location.js
@@ -1,8 +1,6 @@
-jest.autoMockOff();
+var LocationUtils = require('../location');
describe('LocationUtils', function() {
- var LocationUtils = require('../location');
-
it('should correctly test external location', function() {
expect(LocationUtils.isExternal('http://google.fr')).toBe(true);
expect(LocationUtils.isExternal('https://google.fr')).toBe(true);