(status)
| 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"); |
no outgoing calls
no test coverage detected
searching dependent graphs…