Tom MacWright 11d9045a00 Native Flow, use Jest (#767)
* build: Use Flow syntax without comments.

We're switching to Flow annotations - not Flow comments. This
gives documentation.js the ability to self-document without
JSDoc types and improves our compatibility with tools like
prettier.

Fixes #729. Fixes #709
2017-05-08 20:46:21 -04:00

17 lines
426 B
JavaScript

var mock = require('mock-fs');
var mockRepo = require('../../utils').mockRepo;
var path = require('path');
var 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();
});