[Pkg-javascript-commits] [node-tap] 25/186: unit test for clean-yaml-object
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 16:40:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-tap.
commit acf6379511e2222e5ed020b931d9f1346bfdfc82
Author: isaacs <i at izs.me>
Date: Tue Sep 5 21:46:56 2017 -0700
unit test for clean-yaml-object
---
unit/clean-yaml-object.js | 66 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/unit/clean-yaml-object.js b/unit/clean-yaml-object.js
new file mode 100644
index 0000000..8f3de4b
--- /dev/null
+++ b/unit/clean-yaml-object.js
@@ -0,0 +1,66 @@
+'use strict'
+const t = require('../')
+const cyo = require('../lib/clean-yaml-object.js')
+const Domain = require('domain').Domain
+const dom = new Domain()
+dom.whosagooddomain = 'yes you are a good dog'
+
+const cases = [
+ [{
+ domain: { some: 'object' },
+ stack: 'this\nis\na\nstack\n',
+ at: {
+ file: __filename,
+ line: 2,
+ column: 4
+ },
+ foo: {
+ domain: dom,
+ todo: 'maybe',
+ time: 'hours',
+ _tapChild: 'blerg'
+ },
+ _tapChild: 'asdfasdf'
+ }, {
+ stack: 'this\nis\na\nstack\n',
+ at: {
+ file: __filename,
+ line: 2,
+ column: 4
+ },
+ source: 'const t = require(\'../\')\n',
+ foo: {
+ domain: { whosagooddomain: null },
+ todo: 'maybe',
+ time: 'hours',
+ _tapChild: 'blerg'
+ },
+ _tapChild: null
+ }],
+ [{
+ at: {
+ file: require.resolve('../lib/clean-yaml-object.js')
+ }
+ }, { at: null }],
+ [{
+ stack: ' at Foo.bar (/dev/fire/pwn:420:69)\n'
+ }, {
+ stack: ' at Foo.bar (/dev/fire/pwn:420:69)\n',
+ at: {
+ line: 420,
+ column: 69,
+ file: '/dev/fire/pwn',
+ function: 'Foo.bar'
+ }
+ }],
+ [{
+ at: {
+ file: __filename,
+ line: 696969,
+ column: 420420
+ }
+ }, { source: null }],
+ [{ stack: '' }, { stack: null }]
+]
+
+cases.forEach(c => t.match(cyo(c[0]), c[1]))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap.git
More information about the Pkg-javascript-commits
mailing list