Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add test for initExt
  • Loading branch information
maxkorp authored and John Haley committed Dec 5, 2014
commit ea2a39040f19d7afe5b7851292136c7e7eb7b923
10 changes: 10 additions & 0 deletions test/tests/repository.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
var assert = require("assert");
var path = require("path");
var promisify = require("promisify-node");
var fse = promisify(require("fs-extra"));

describe("Repository", function() {
var reposPath = path.resolve("test/repos/workdir/.git");
Expand Down Expand Up @@ -41,6 +43,14 @@ describe("Repository", function() {
});
});

it("can utilize repository init options", function() {
return fse.remove(newRepo).then(function() {
return Repository.initExt(newRepo, {
flags: Repository.INIT_FLAG.MKPATH
});
});
});

it("can read the index", function() {
return this.repository.index().then(function(index) {
assert.ok(index instanceof Index);
Expand Down