[Pkg-javascript-commits] [node-clean-yaml-object] 05/21: fix node 10 error

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 c26eb27a2d4bb779ddd600ff94a13ba0dc15a6e4
Author: James Talmage <james at talmage.io>
Date:   Fri Jan 15 22:48:15 2016 -0500

    fix node 10 error
---
 test.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/test.js b/test.js
index 36c09fa..de3739b 100644
--- a/test.js
+++ b/test.js
@@ -34,13 +34,17 @@ test('Array holes are filled', t => {
 
 test.cb('Errors have their domain stripped', t => {
 	t.plan(2);
+
+	// These two extra properties show up in Node `0.10`
+	const filter = k => !/^(type|arguments)/.test(k);
+
 	domain.create()
 		.on('error', e => {
 			t.same(
-				Object.getOwnPropertyNames(e).sort(),
+				Object.getOwnPropertyNames(e).filter(filter).sort(),
 				['domain', 'domainThrown', 'message', 'stack']
 			);
-			t.same(Object.keys(fn(e)).sort(), ['message', 'name', 'stack']);
+			t.same(Object.keys(fn(e, filter)).sort(), ['message', 'name', 'stack']);
 			t.end();
 		})
 		.run(() => {

-- 
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