documentation/test/lib/git/find_git.js
Anton 5fe1859da8 text(windows): Fix tests on Windows platform
* Fixed find_git test for windows platform.

* Fixed github test on windows platform.

* Fixed bin tests which are executed process from node.js

* On windows platform uses DOUBLE EXCLAMATION MARK instead of WARNING SIGN.
2017-03-30 21:35:11 -04:00

25 lines
496 B
JavaScript

'use strict';
var test = require('tap').test,
mock = require('mock-fs'),
mockRepo = require('./mock_repo'),
path = require('path'),
findGit = require('../../../lib/git/find_git');
test('findGit', function (t) {
mock(mockRepo.master);
const root = path.parse(__dirname).root;
t.equal(
findGit(
root + path.join('my', 'repository', 'path', 'index.js')),
root + path.join('my', 'repository', 'path', '.git'), 'finds git path');
mock.restore();
t.end();
});