[Pkg-javascript-commits] [node-clean-yaml-object] 03/21: add coverage
Bastien Roucariès
rouca at moszumanska.debian.org
Thu Sep 7 09:52:17 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-clean-yaml-object.
commit da6dcc5578bc5bd54c7cbeb8472aa999038e2837
Author: James Talmage <james at talmage.io>
Date: Fri Jan 15 22:28:35 2016 -0500
add coverage
---
.gitignore | 2 ++
package.json | 3 ++-
test.js | 7 +++++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 3c3629e..1e59e82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
node_modules
+.nyc_output
+coverage
diff --git a/package.json b/package.json
index 59a7fbb..52d064f 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
"node": ">=0.10.0"
},
"scripts": {
- "test": "xo && ava"
+ "test": "xo && nyc --cache --reporter=lcov --reporter=text ava"
},
"files": [
"index.js"
@@ -24,6 +24,7 @@
"dependencies": {},
"devDependencies": {
"ava": "^0.10.0",
+ "nyc": "^5.3.0",
"xo": "^0.12.1"
}
}
diff --git a/test.js b/test.js
index 27e3d46..36c09fa 100644
--- a/test.js
+++ b/test.js
@@ -111,3 +111,10 @@ test('should work on arrays', t => {
t.is(serialized.b.y[1][0], '[Circular]');
t.is(serialized.b.y[0][1], '[Circular]');
});
+
+test('custom filter', t => {
+ t.same(
+ fn({a: 'a', b: 'b', c: 'c'}, k => k === 'c'),
+ {c: 'c'}
+ );
+});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-clean-yaml-object.git
More information about the Pkg-javascript-commits
mailing list