MCPcopy Index your code
hub / github.com/nodegit/nodegit / testStatusFile

Function testStatusFile

test/tests/status_file.js:10–31  ·  view source on GitHub ↗
(status)

Source from the content-addressed store, hash-verified

8 var pathName = "README.md";
9
10 function testStatusFile(status) {
11 var statusFile = new StatusFile({
12 path: pathName,
13 status: Status.STATUS[status]
14 });
15 var specialFunction = status.replace(/^(WT|INDEX)_/, "");
16 specialFunction = "is" +
17 specialFunction[0] +
18 specialFunction.substring(1).toLowerCase();
19 if (/^WT_/.test(status)) {
20 assert.ok(statusFile.inWorkingTree());
21 assert.ok(!statusFile.inIndex());
22 }
23 if (/^INDEX_/.test(status)) {
24 assert.ok(!statusFile.inWorkingTree());
25 assert.ok(statusFile.inIndex());
26 }
27 assert.equal(statusFile.path(), pathName);
28 assert.equal(statusFile.statusBit(), Status.STATUS[status]);
29 assert.equal(statusFile.status(), status);
30 assert.ok(statusFile[specialFunction]());
31 }
32
33 it.skip("identifies the proper statuses for CURRENT", function() {
34 testStatusFile("CURRENT");

Callers 1

status_file.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…