From f71cd811c4f9504aff7d51aa8d9c507de3f0badc Mon Sep 17 00:00:00 2001 From: Danny Banks Date: Mon, 20 Jul 2020 10:54:22 -0700 Subject: [PATCH] chore(tests): fixing tests --- __tests__/utils/combineJSON.test.js | 2 -- lib/utils/combineJSON.js | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/__tests__/utils/combineJSON.test.js b/__tests__/utils/combineJSON.test.js index cbe021875..57baabd26 100644 --- a/__tests__/utils/combineJSON.test.js +++ b/__tests__/utils/combineJSON.test.js @@ -37,7 +37,6 @@ describe('utils', () => { it('should do a deep merge', () => { var test = combineJSON(["__tests__/__json_files/shallow/*.json"], true); - console.log(test); expect(test).toHaveProperty('a', 2); expect(test.b).toMatchObject({"a":1, "c":2}) expect(test).toHaveProperty('d.e.f.g', 1); @@ -46,7 +45,6 @@ describe('utils', () => { it('should do a shallow merge', () => { var test = combineJSON(["__tests__/__json_files/shallow/*.json"]); - console.log(test); expect(test).toHaveProperty('a', 2); expect(test.b).toMatchObject({"c":2}); expect(test).toHaveProperty('c', [3,4]); diff --git a/lib/utils/combineJSON.js b/lib/utils/combineJSON.js index 6c3496e46..036ac50c2 100644 --- a/lib/utils/combineJSON.js +++ b/lib/utils/combineJSON.js @@ -49,11 +49,9 @@ function combineJSON(arr, deep, collision, source, parsers=[]) { files = files.concat(new_files); } - console.log(files); for (i = 0; i < files.length; i++) { var resolvedPath = resolveCwd(path.isAbsolute(files[i]) ? files[i] : './' + files[i]); - var file_content; - console.log(file_content); + var file_content = null; try { // This delete force require(resolvedPath) to take the latest version of the file. It's handfull when using the node package along chokidar.