@@ -30,8 +30,6 @@ tape('throws (Function match)', function (t) {
30
30
} ) ;
31
31
32
32
tap . test ( 'failures' , function ( tt ) {
33
- tt . plan ( 1 ) ;
34
-
35
33
var test = tape . createHarness ( ) ;
36
34
test . createStream ( ) . pipe ( concat ( function ( body ) {
37
35
tt . equal (
@@ -41,73 +39,57 @@ tap.test('failures', function (tt) {
41
39
+ 'not ok 1 should throw\n'
42
40
+ ' ---\n'
43
41
+ ' operator: throws\n'
44
- + ' expected: |-\n'
45
- + ' undefined\n'
46
- + ' actual: |-\n'
47
- + " { [TypeError: " + getNonFunctionMessage ( ) + "] message: '" + getNonFunctionMessage ( ) + "' }\n"
42
+ + ' expected: \n'
43
+ + " actual: {\"message\":\"" + getNonFunctionMessage ( ) + '"}\n'
48
44
+ ' ...\n'
49
45
+ 'not ok 2 should throw\n'
50
46
+ ' ---\n'
51
47
+ ' operator: throws\n'
52
- + ' expected: |-\n'
53
- + ' undefined\n'
54
- + ' actual: |-\n'
55
- + " { [TypeError: " + getNonFunctionMessage ( null ) + "] message: '" + getNonFunctionMessage ( null ) + "' }\n"
48
+ + ' expected: \n'
49
+ + " actual: {\"message\":\"" + getNonFunctionMessage ( null ) + '"}\n'
56
50
+ ' ...\n'
57
51
+ 'not ok 3 should throw\n'
58
52
+ ' ---\n'
59
53
+ ' operator: throws\n'
60
- + ' expected: |-\n'
61
- + ' undefined\n'
62
- + ' actual: |-\n'
63
- + " { [TypeError: " + getNonFunctionMessage ( true ) + "] message: '" + getNonFunctionMessage ( true ) + "' }\n"
54
+ + ' expected: \n'
55
+ + " actual: {\"message\":\"" + getNonFunctionMessage ( true ) + '"}\n'
64
56
+ ' ...\n'
65
57
+ 'not ok 4 should throw\n'
66
58
+ ' ---\n'
67
59
+ ' operator: throws\n'
68
- + ' expected: |-\n'
69
- + ' undefined\n'
70
- + ' actual: |-\n'
71
- + " { [TypeError: " + getNonFunctionMessage ( false ) + "] message: '" + getNonFunctionMessage ( false ) + "' }\n"
60
+ + ' expected: \n'
61
+ + " actual: {\"message\":\"" + getNonFunctionMessage ( false ) + '"}\n'
72
62
+ ' ...\n'
73
63
+ 'not ok 5 should throw\n'
74
64
+ ' ---\n'
75
65
+ ' operator: throws\n'
76
- + ' expected: |-\n'
77
- + ' undefined\n'
78
- + ' actual: |-\n'
79
- + " { [TypeError: " + getNonFunctionMessage ( 'abc' ) + "] message: '" + getNonFunctionMessage ( 'abc' ) + "' }\n"
66
+ + ' expected: \n'
67
+ + " actual: {\"message\":\"" + getNonFunctionMessage ( 'abc' ) + '"}\n'
80
68
+ ' ...\n'
81
69
+ 'not ok 6 should throw\n'
82
70
+ ' ---\n'
83
71
+ ' operator: throws\n'
84
- + ' expected: |-\n'
85
- + ' undefined\n'
86
- + ' actual: |-\n'
87
- + " { [TypeError: " + getNonFunctionMessage ( / a / g) + "] message: '" + getNonFunctionMessage ( / a / g) + "' }\n"
72
+ + ' expected: \n'
73
+ + " actual: {\"message\":\"" + getNonFunctionMessage ( / a / g) + '"}\n'
88
74
+ ' ...\n'
89
75
+ 'not ok 7 should throw\n'
90
76
+ ' ---\n'
91
77
+ ' operator: throws\n'
92
- + ' expected: |-\n'
93
- + ' undefined\n'
94
- + ' actual: |-\n'
95
- + " { [TypeError: " + getNonFunctionMessage ( [ ] ) + "] message: '" + getNonFunctionMessage ( [ ] ) + "' }\n"
78
+ + ' expected: \n'
79
+ + " actual: {\"message\":\"" + getNonFunctionMessage ( [ ] ) + '"}\n'
96
80
+ ' ...\n'
97
81
+ 'not ok 8 should throw\n'
98
82
+ ' ---\n'
99
83
+ ' operator: throws\n'
100
- + ' expected: |-\n'
101
- + ' undefined\n'
102
- + ' actual: |-\n'
103
- + " { [TypeError: " + getNonFunctionMessage ( { } ) + "] message: '" + getNonFunctionMessage ( { } ) + "' }\n"
84
+ + ' expected: \n'
85
+ + " actual: {\"message\":\"" + getNonFunctionMessage ( { } ) + '"}\n'
104
86
+ ' ...\n'
105
87
+ '# function\n'
106
88
+ 'not ok 9 should throw\n'
107
89
+ ' ---\n'
108
90
+ ' operator: throws\n'
109
- + ' expected: undefined \n'
110
- + ' actual: undefined \n'
91
+ + ' expected: \n'
92
+ + ' actual: \n'
111
93
+ ' ...\n\n'
112
94
+ '1..9\n'
113
95
+ '# tests 9\n'
@@ -117,7 +99,6 @@ tap.test('failures', function (tt) {
117
99
} ) ) ;
118
100
119
101
test ( 'non functions' , function ( t ) {
120
- t . plan ( 8 ) ;
121
102
t . throws ( ) ;
122
103
t . throws ( null ) ;
123
104
t . throws ( true ) ;
@@ -126,10 +107,13 @@ tap.test('failures', function (tt) {
126
107
t . throws ( / a / g) ;
127
108
t . throws ( [ ] ) ;
128
109
t . throws ( { } ) ;
110
+ t . end ( ) ;
129
111
} ) ;
130
112
131
113
test ( 'function' , function ( t ) {
132
- t . plan ( 1 ) ;
133
114
t . throws ( function ( ) { } ) ;
115
+ t . end ( ) ;
134
116
} ) ;
117
+
118
+ tt . end ( ) ;
135
119
} ) ;
0 commit comments