Skip to content

Commit 8d338f3

Browse files
committed
Remove improper glob pattern for Windows
1 parent 9ea39f6 commit 8d338f3

File tree

3 files changed

+41
-58
lines changed

3 files changed

+41
-58
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"host": "https://s3.amazonaws.com/nodegit/nodegit/"
6868
},
6969
"scripts": {
70-
"lint": "jshint lib test/tests/*.js",
70+
"lint": "jshint lib test/tests",
7171
"mocha": "istanbul cover _mocha -- test/runner test/tests --report=lcov",
7272
"test": "npm run lint && npm run mocha",
7373
"publish": "node-pre-gyp package && node-pre-gyp publish",

test/repository.js

Lines changed: 0 additions & 57 deletions
This file was deleted.

test/tests/repository.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
var assert = require("assert");
2+
var path = require("path");
3+
4+
describe("Repository", function() {
5+
var reposPath = path.resolve("test/repos/workdir/.git");
6+
7+
var Repository = require("../../lib/repository");
8+
9+
before(function() {
10+
var test = this;
11+
12+
return Repository.open(reposPath).then(function(repository) {
13+
test.repository = repository;
14+
});
15+
});
16+
17+
it("can open a valid repository", function() {
18+
assert.ok(this.repository instanceof Repository);
19+
});
20+
21+
it("cannot open an invalid repository", function() {
22+
return Repository.open("repos/nonrepo").then(null, function(err) {
23+
assert.ok(err instanceof Error);
24+
});
25+
});
26+
27+
it("does not try to open paths that don't exist", function() {
28+
var missingPath = "/surely/this/directory/does/not/exist/on/this/machine";
29+
30+
return Repository.open(missingPath).then(null, function(err) {
31+
assert.ok(err instanceof Error);
32+
});
33+
});
34+
35+
it("can initialize a repository into a folder", function() {
36+
return Repository.init("repos/newrepo", 1).then(function(path, isBare) {
37+
return Repository.open("repos/newrepo");
38+
});
39+
});
40+
});

0 commit comments

Comments
 (0)