mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
* style(prettier): Use prettier for code formatting This saves us style issues. Also adds husky and lint-staged for pre-commit testing Refs https://github.com/documentationjs/documentation/issues/709
24 lines
491 B
JavaScript
24 lines
491 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();
|
|
});
|