From 65848d1a763be07cf09aa4b90a41e7d8830b56ca Mon Sep 17 00:00:00 2001 From: Yami Date: Fri, 1 Apr 2016 12:14:03 +0000 Subject: [PATCH 1/3] Updating instructions to match reality --- tests/mocks/databasemock.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/mocks/databasemock.js b/tests/mocks/databasemock.js index a895d25c8a..06b3790a65 100644 --- a/tests/mocks/databasemock.js +++ b/tests/mocks/databasemock.js @@ -36,14 +36,14 @@ ' "host": "127.0.0.1",' + '\n' + ' "port": "6379",' + '\n' + ' "password": "",' + '\n' + - ' "database": "1"' + '\n' + + ' "database": "redis"' + '\n' + '}\n'+ ' or (mongo):\n' + '"test_database": {' + '\n' + ' "host": "127.0.0.1",' + '\n' + ' "port": "27017",' + '\n' + ' "password": "",' + '\n' + - ' "database": "1"' + '\n' + + ' "database": "mongo"' + '\n' + '}\n'+ ' or (mongo) in a replicaset' + '\n' + '"test_database": {' + '\n' + From d78edf6f726889ce01b0c8d5aa79990a35ec5b4e Mon Sep 17 00:00:00 2001 From: Yami Date: Fri, 1 Apr 2016 12:20:02 +0000 Subject: [PATCH 2/3] adding istanbul coverage --- .gitignore | 5 ++++- package.json | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 144cfe268a..a8ea9cb1eb 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,7 @@ pidfile ## Transifex tx.exe -.transifexrc \ No newline at end of file +.transifexrc + +##Coverage output +coverage \ No newline at end of file diff --git a/package.json b/package.json index e675f0d17f..910279dd35 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "main": "app.js", "scripts": { "start": "node loader.js", - "test": "mocha ./tests -t 10000" + "test": "./node_modules/.bin/istanbul test ./node_modules/.bin/_mocha -- ./tests -t 10000" }, "dependencies": { "async": "~1.5.0", @@ -85,9 +85,10 @@ "xregexp": "~3.1.0" }, "devDependencies": { - "mocha": "~1.13.0", "grunt": "~0.4.5", - "grunt-contrib-watch": "^0.6.1" + "grunt-contrib-watch": "^0.6.1", + "istanbul": "^0.4.2", + "mocha": "~1.13.0" }, "bugs": { "url": "https://github.com/NodeBB/NodeBB/issues" From 31dcd99e6e32f29798f79a2f672c56f6e8e8b54b Mon Sep 17 00:00:00 2001 From: Yami Date: Fri, 1 Apr 2016 12:23:51 +0000 Subject: [PATCH 3/3] Changed to automatically report coverage --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 910279dd35..cc73da942e 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "main": "app.js", "scripts": { "start": "node loader.js", - "test": "./node_modules/.bin/istanbul test ./node_modules/.bin/_mocha -- ./tests -t 10000" + "test": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- ./tests -t 10000" }, "dependencies": { "async": "~1.5.0",