-
Notifications
You must be signed in to change notification settings - Fork 696
Expand file tree
/
Copy pathblame.js
More file actions
36 lines (29 loc) · 837 Bytes
/
blame.js
File metadata and controls
36 lines (29 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
var assert = require("assert");
var RepoUtils = require("../utils/repository_setup");
var path = require("path");
var local = path.join.bind(path, __dirname);
describe("Blame", function() {
var NodeGit = require("../../");
var Blame = NodeGit.Blame;
var test;
var fileName = "foobar.js";
var repoPath = local("../repos/blameRepo");
beforeEach(function() {
test = this;
return RepoUtils.createRepository(repoPath)
.then(function(repository) {
test.repository = repository;
return RepoUtils.commitFileToRepo(
repository,
fileName,
"line1\nline2\nline3"
);
});
});
it("can initialize blame without options", function() {
return Blame.file(test.repository, fileName)
.then(function(blame) {
assert(blame);
});
});
});