mirror of
https://github.com/documentationjs/documentation.git
synced 2025-12-08 18:23:43 +00:00
17 lines
434 B
JavaScript
17 lines
434 B
JavaScript
const mock = require('mock-fs');
|
|
const mockRepo = require('../../utils').mockRepo;
|
|
const path = require('path');
|
|
const findGit = require('../../../src/git/find_git');
|
|
|
|
test('findGit', function() {
|
|
mock(mockRepo.master);
|
|
|
|
const root = path.parse(__dirname).root;
|
|
|
|
expect(
|
|
findGit(root + path.join('my', 'repository', 'path', 'index.js'))
|
|
).toBe(root + path.join('my', 'repository', 'path', '.git'));
|
|
|
|
mock.restore();
|
|
});
|