Package: node-tape / 4.9.1-1

0004-Fix-test-error.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
From a240a4f788bcdd071ee40bf03795470076ab9a93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Thu, 5 Oct 2017 12:41:43 +0200
Subject: Fix test error

Forwarded: yes
bug: https://github.com/substack/tape/issues/398
---
 test/deep-equal-failure.js | 6 +++---
 test/stackTrace.js         | 6 +++---
 test/too_many.js           | 3 ---
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/test/deep-equal-failure.js b/test/deep-equal-failure.js
index 48d0687..a15382c 100644
--- a/test/deep-equal-failure.js
+++ b/test/deep-equal-failure.js
@@ -10,7 +10,7 @@ var stripFullStack = common.stripFullStack;
 tap.test('deep equal failure', function (assert) {
     var test = tape.createHarness({ exit : false });
     var stream = test.createStream();
-    var parser = tapParser();
+    var parser = new tapParser();
     assert.plan(3);
 
     stream.pipe(parser);
@@ -71,7 +71,7 @@ tap.test('deep equal failure', function (assert) {
 tap.test('deep equal failure, depth 6, with option', function (assert) {
     var test = tape.createHarness({ exit : false });
     var stream = test.createStream();
-    var parser = tapParser();
+    var parser = new tapParser();
     assert.plan(3);
 
     stream.pipe(parser);
@@ -132,7 +132,7 @@ tap.test('deep equal failure, depth 6, with option', function (assert) {
 tap.test('deep equal failure, depth 6, without option', function (assert) {
     var test = tape.createHarness({ exit : false });
     var stream = test.createStream();
-    var parser = tapParser();
+    var parser = new tapParser();
     assert.plan(3);
 
     stream.pipe(parser);
diff --git a/test/stackTrace.js b/test/stackTrace.js
index 8da3b52..387f9f7 100644
--- a/test/stackTrace.js
+++ b/test/stackTrace.js
@@ -9,7 +9,7 @@ tap.test('preserves stack trace with newlines', function (tt) {
 
     var test = tape.createHarness();
     var stream = test.createStream();
-    var parser = stream.pipe(tapParser());
+    var parser = stream.pipe(new tapParser());
     var stackTrace = 'foo\n  bar';
 
     parser.once('assert', function (data) {
@@ -109,7 +109,7 @@ tap.test('preserves stack trace for failed assertions', function (tt) {
 
     var test = tape.createHarness();
     var stream = test.createStream();
-    var parser = stream.pipe(tapParser());
+    var parser = stream.pipe(new tapParser());
 
     var stack = ''
     parser.once('assert', function (data) {
@@ -174,7 +174,7 @@ tap.test('preserves stack trace for failed assertions where actual===falsy', fun
 
     var test = tape.createHarness();
     var stream = test.createStream();
-    var parser = stream.pipe(tapParser());
+    var parser = stream.pipe(new tapParser());
 
     var stack = ''
     parser.once('assert', function (data) {
diff --git a/test/too_many.js b/test/too_many.js
index 5c7e4b3..f468638 100644
--- a/test/too_many.js
+++ b/test/too_many.js
@@ -28,9 +28,6 @@ tap.test('array test', function (tt) {
             '          [... stack stripped ...]',
             '          at $TEST/too_many.js:$LINE:$COL',
             '          at eval (eval at <anonymous> ($TEST/too_many.js:$LINE:$COL))',
-            '          at eval (eval at <anonymous> ($TEST/too_many.js:$LINE:$COL))',
-            '          at Test.<anonymous> ($TEST/too_many.js:$LINE:$COL)',
-            '          [... stack stripped ...]',
             '  ...',
             'ok 6 should be equivalent',
             '',