Skip to content

Commit ea2a390

Browse files
maxkorpJohn Haley
authored andcommitted
add test for initExt
1 parent e35db07 commit ea2a390

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/tests/repository.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
var assert = require("assert");
22
var path = require("path");
3+
var promisify = require("promisify-node");
4+
var fse = promisify(require("fs-extra"));
35

46
describe("Repository", function() {
57
var reposPath = path.resolve("test/repos/workdir/.git");
@@ -41,6 +43,14 @@ describe("Repository", function() {
4143
});
4244
});
4345

46+
it("can utilize repository init options", function() {
47+
return fse.remove(newRepo).then(function() {
48+
return Repository.initExt(newRepo, {
49+
flags: Repository.INIT_FLAG.MKPATH
50+
});
51+
});
52+
});
53+
4454
it("can read the index", function() {
4555
return this.repository.index().then(function(index) {
4656
assert.ok(index instanceof Index);

0 commit comments

Comments
 (0)