Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ This is a guide on how to contribute test cases to help with coverage testing fo
Currently there are a number of fields and functions in NodeGit that have no tests at all. A list of which files are missing and what fields and functions need tests can be generated by running

``` bash
npm run missing-tests
npm run generateMissingTests
```

This will make the file `generate/missing-tests.json` which will contain info for tests or files that are currently missing.
This will make the file `generate/output/missing-tests.json` which will contain info for tests or files that are currently missing.

From this file you can find fields and functions that don't have any tests yet and pick one to work on.

Expand Down Expand Up @@ -42,7 +42,7 @@ If a specific field or function is further wrapped via a file inside of `/lib` t

You can mark something to be ignored inside of the `/generate/missing-tests-ignore.json` file.

After you write your test make sure to run `npm run missing-tests` again to confirm that the field/function that a test was written for no longer shows up.
After you write your test make sure to run `npm run generateMissingTests` again to confirm that the field/function that a test was written for no longer shows up.

## Test results ##

Expand Down
6 changes: 3 additions & 3 deletions generate/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require("./scripts/generateJson")();
require("./scripts/generateNativeCode")();
require("./scripts/generateMissingTests")();
require("./scripts/generateJson");
require("./scripts/generateNativeCode");
require("./scripts/generateMissingTests");
4 changes: 2 additions & 2 deletions generate/scripts/generateJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var libgit2 = require("../input/v" + version + ".json");
var descriptor = require("../input/descriptor.json");
var supplement = require("../input/libgit2-supplement.json");

module.exports = function() {
module.exports = (function generateJson() {
libgit2.types.forEach(function(type) {
if (supplement.types[type[0]]){
_.merge(type[1], supplement.types[type[0]]);
Expand Down Expand Up @@ -219,4 +219,4 @@ module.exports = function() {

utils.writeFile("output/idefs.json", output);

}
}());
5 changes: 3 additions & 2 deletions generate/scripts/generateMissingTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const testFilesPath = "../test/tests";
const idefs = require("../output/idefs");
const missingFileIgnores = require("../input/ignored-missing-tests");

module.exports = function() {
module.exports = (function generateMissingTests() {
var output = {};

function findMissingTest(idef) {
Expand Down Expand Up @@ -70,4 +70,5 @@ module.exports = function() {
}
);

}
}());

4 changes: 2 additions & 2 deletions generate/scripts/generateNativeCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const exec = promisify(function(command, opts, callback) {
const utils = require("./utils");
const idefs = require("../output/idefs");

module.exports = function() {
module.exports = (function generateNativeCode() {
// Customize the delimiters so as to not process `{{{` or `}}}`.
combyne.settings.delimiters = {
START_RAW: "{{=",
Expand Down Expand Up @@ -143,4 +143,4 @@ module.exports = function() {
})
});

}
}());