| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2cb72ce commit 9eb9851
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,34 @@ | |||
| 1 | + { | ||
| 2 | + "blob": { | ||
| 3 | + "functions": [ | ||
| 4 | + "createFrombuffer", | ||
| 5 | + "isBinary", | ||
| 6 | + "lookup", | ||
| 7 | + "rawcontent", | ||
| 8 | + "rawsize" | ||
| 9 | + ] | ||
| 10 | + }, | ||
| 11 | + "clone": { | ||
| 12 | + "functions": [ | ||
| 13 | + "initOptions" | ||
| 14 | + ] | ||
| 15 | + }, | ||
| 16 | + "commit": { | ||
| 17 | + "functions": [ | ||
| 18 | + "parentCount", | ||
| 19 | + "parentId", | ||
| 20 | + "treeId" | ||
| 21 | + ] | ||
| 22 | + }, | ||
| 23 | + "diff": { | ||
| 24 | + "functions": [ | ||
| 25 | + "getDelta", | ||
| 26 | + "numDeltas" | ||
| 27 | + ] | ||
| 28 | + }, | ||
| 29 | + "object": { | ||
| 30 | + "functions": [ | ||
| 31 | + "type" | ||
| 32 | + ] | ||
| 33 | + } | ||
| 34 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,7 @@ const Promise = require("nodegit-promise"); | |||
| 4 | 4 | const promisify = require("promisify-node"); | |
| 5 | 5 | const fse = promisify(require("fs-extra")); | |
| 6 | 6 | const testFilesPath = path.resolve(__dirname, "../test/tests"); | |
| 7 | + const missingFileIgnores = require("./missing-tests-ignore"); | ||
| 7 | 8 | ||
| 8 | 9 | var output = {}; | |
| 9 | 10 | ||
@@ -15,17 +16,25 @@ function findMissingTest(idef) { | |||
| 15 | 16 | .then(function(file) { | |
| 16 | 17 | var fieldsResult = []; | |
| 17 | 18 | var functionsResult = []; | |
| 19 | + var fieldIgnores = (missingFileIgnores[idef.filename] || {}).fields; | ||
| 20 | + var functionIgnores = (missingFileIgnores[idef.filename] || {}).functions; | ||
| 21 | + | ||
| 22 | + fieldIgnores = fieldIgnores || []; | ||
| 23 | + functionIgnores = functionIgnores || []; | ||
| 24 | + file = file || ""; | ||
| 18 | 25 | ||
| 19 | 26 | idef.fields.forEach(function(field) { | |
| 20 | - if (file.indexOf(field.jsFunctionName) < 0) { | ||
| 27 | + if (file.indexOf(field.jsFunctionName) < 0 | ||
| 28 | + && fieldIgnores.indexOf(field.jsFunctionName < 0)) { | ||
| 21 | 29 | fieldsResult.push(field.jsFunctionName); | |
| 22 | 30 | } | |
| 23 | 31 | }); | |
| 24 | 32 | ||
| 25 | 33 | result.fields = fieldsResult; | |
| 26 | 34 | ||
| 27 | 35 | idef.functions.forEach(function(fn) { | |
| 28 | - if (file.indexOf(fn.jsFunctionName) < 0) { | ||
| 36 | + if (file.indexOf(fn.jsFunctionName) < 0 | ||
| 37 | + && functionIgnores.indexOf(fn.jsFunctionName) < 0) { | ||
| 29 | 38 | functionsResult.push(fn.jsFunctionName); | |
| 30 | 39 | } | |
| 31 | 40 | }); | |
@@ -50,4 +59,6 @@ Promise.all(promises) | |||
| 50 | 59 | .then(function() { | |
| 51 | 60 | fse.writeFileSync(path.join(__dirname, "missing-tests.json"), | |
| 52 | 61 | JSON.stringify(output, null, 2)); | |
| 62 | + }, function(fail) { | ||
| 63 | + console.log(fail); | ||
| 53 | 64 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments