@@ -11,145 +11,146 @@ tap.test('numerics', function (tt) {
11
11
12
12
var test = tape . createHarness ( ) ;
13
13
test . createStream ( ) . pipe ( concat ( function ( body ) {
14
- tt . equal (
15
- stripFullStack ( body . toString ( 'utf8' ) ) ,
16
- 'TAP version 13\n'
17
- + '# numeric strings\n'
18
- + 'not ok 1 number equal to string\n'
19
- + ' ---\n'
20
- + ' operator: equal\n'
21
- + ' expected: \'3\'\n'
22
- + ' actual: 3\n'
23
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
24
- + ' stack: |-\n'
25
- + ' Error: number equal to string\n'
26
- + ' [... stack stripped ...]\n'
27
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
28
- + ' [... stack stripped ...]\n'
29
- + ' ...\n'
30
- + 'not ok 2 string equal to number\n'
31
- + ' ---\n'
32
- + ' operator: equal\n'
33
- + ' expected: 3\n'
34
- + ' actual: \'3\'\n'
35
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
36
- + ' stack: |-\n'
37
- + ' Error: string equal to number\n'
38
- + ' [... stack stripped ...]\n'
39
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
40
- + ' [... stack stripped ...]\n'
41
- + ' ...\n'
42
- + 'ok 3 number notEqual to string\n'
43
- + 'ok 4 string notEqual to number\n'
44
- + 'ok 5 number looseEqual to string\n'
45
- + 'ok 6 string looseEqual to number\n'
46
- + 'not ok 7 number notLooseEqual to string\n'
47
- + ' ---\n'
48
- + ' operator: notLooseEqual\n'
49
- + ' expected: \'3\'\n'
50
- + ' actual: 3\n'
51
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
52
- + ' stack: |-\n'
53
- + ' Error: number notLooseEqual to string\n'
54
- + ' [... stack stripped ...]\n'
55
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
56
- + ' [... stack stripped ...]\n'
57
- + ' ...\n'
58
- + 'not ok 8 string notLooseEqual to number\n'
59
- + ' ---\n'
60
- + ' operator: notLooseEqual\n'
61
- + ' expected: 3\n'
62
- + ' actual: \'3\'\n'
63
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
64
- + ' stack: |-\n'
65
- + ' Error: string notLooseEqual to number\n'
66
- + ' [... stack stripped ...]\n'
67
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
68
- + ' [... stack stripped ...]\n'
69
- + ' ...\n'
70
- + 'not ok 9 number strictEqual to string\n'
71
- + ' ---\n'
72
- + ' operator: equal\n'
73
- + ' expected: \'3\'\n'
74
- + ' actual: 3\n'
75
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
76
- + ' stack: |-\n'
77
- + ' Error: number strictEqual to string\n'
78
- + ' [... stack stripped ...]\n'
79
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
80
- + ' [... stack stripped ...]\n'
81
- + ' ...\n'
82
- + 'not ok 10 string strictEqual to number\n'
83
- + ' ---\n'
84
- + ' operator: equal\n'
85
- + ' expected: 3\n'
86
- + ' actual: \'3\'\n'
87
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
88
- + ' stack: |-\n'
89
- + ' Error: string strictEqual to number\n'
90
- + ' [... stack stripped ...]\n'
91
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
92
- + ' [... stack stripped ...]\n'
93
- + ' ...\n'
94
- + 'ok 11 number notStrictEqual to string\n'
95
- + 'ok 12 string notStrictEqual to number\n'
96
- + 'ok 13 number deepLooseEqual to string\n'
97
- + 'ok 14 string deepLooseEqual to number\n'
98
- + 'not ok 15 number notDeepLooseEqual to string\n'
99
- + ' ---\n'
100
- + ' operator: notDeepLooseEqual\n'
101
- + ' expected: \'3\'\n'
102
- + ' actual: 3\n'
103
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
104
- + ' stack: |-\n'
105
- + ' Error: number notDeepLooseEqual to string\n'
106
- + ' [... stack stripped ...]\n'
107
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
108
- + ' [... stack stripped ...]\n'
109
- + ' ...\n'
110
- + 'not ok 16 string notDeepLooseEqual to number\n'
111
- + ' ---\n'
112
- + ' operator: notDeepLooseEqual\n'
113
- + ' expected: 3\n'
114
- + ' actual: \'3\'\n'
115
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
116
- + ' stack: |-\n'
117
- + ' Error: string notDeepLooseEqual to number\n'
118
- + ' [... stack stripped ...]\n'
119
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
120
- + ' [... stack stripped ...]\n'
121
- + ' ...\n'
122
- + 'not ok 17 number deepEqual to string\n'
123
- + ' ---\n'
124
- + ' operator: deepEqual\n'
125
- + ' expected: \'3\'\n'
126
- + ' actual: 3\n'
127
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
128
- + ' stack: |-\n'
129
- + ' Error: number deepEqual to string\n'
130
- + ' [... stack stripped ...]\n'
131
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
132
- + ' [... stack stripped ...]\n'
133
- + ' ...\n'
134
- + 'not ok 18 string deepEqual to number\n'
135
- + ' ---\n'
136
- + ' operator: deepEqual\n'
137
- + ' expected: 3\n'
138
- + ' actual: \'3\'\n'
139
- + ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
140
- + ' stack: |-\n'
141
- + ' Error: string deepEqual to number\n'
142
- + ' [... stack stripped ...]\n'
143
- + ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)\n'
144
- + ' [... stack stripped ...]\n'
145
- + ' ...\n'
146
- + 'ok 19 number notDeepEqual to string\n'
147
- + 'ok 20 string notDeepEqual to number\n'
148
- + '\n1..20\n'
149
- + '# tests 20\n'
150
- + '# pass 10\n'
151
- + '# fail 10\n'
152
- ) ;
14
+ tt . same ( stripFullStack ( body . toString ( 'utf8' ) ) , [
15
+ 'TAP version 13' ,
16
+ '# numeric strings' ,
17
+ 'not ok 1 number equal to string' ,
18
+ ' ---' ,
19
+ ' operator: equal' ,
20
+ ' expected: \'3\'' ,
21
+ ' actual: 3' ,
22
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
23
+ ' stack: |-' ,
24
+ ' Error: number equal to string' ,
25
+ ' [... stack stripped ...]' ,
26
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
27
+ ' [... stack stripped ...]' ,
28
+ ' ...' ,
29
+ 'not ok 2 string equal to number' ,
30
+ ' ---' ,
31
+ ' operator: equal' ,
32
+ ' expected: 3' ,
33
+ ' actual: \'3\'' ,
34
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
35
+ ' stack: |-' ,
36
+ ' Error: string equal to number' ,
37
+ ' [... stack stripped ...]' ,
38
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
39
+ ' [... stack stripped ...]' ,
40
+ ' ...' ,
41
+ 'ok 3 number notEqual to string' ,
42
+ 'ok 4 string notEqual to number' ,
43
+ 'ok 5 number looseEqual to string' ,
44
+ 'ok 6 string looseEqual to number' ,
45
+ 'not ok 7 number notLooseEqual to string' ,
46
+ ' ---' ,
47
+ ' operator: notLooseEqual' ,
48
+ ' expected: \'3\'' ,
49
+ ' actual: 3' ,
50
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
51
+ ' stack: |-' ,
52
+ ' Error: number notLooseEqual to string' ,
53
+ ' [... stack stripped ...]' ,
54
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
55
+ ' [... stack stripped ...]' ,
56
+ ' ...' ,
57
+ 'not ok 8 string notLooseEqual to number' ,
58
+ ' ---' ,
59
+ ' operator: notLooseEqual' ,
60
+ ' expected: 3' ,
61
+ ' actual: \'3\'' ,
62
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
63
+ ' stack: |-' ,
64
+ ' Error: string notLooseEqual to number' ,
65
+ ' [... stack stripped ...]' ,
66
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
67
+ ' [... stack stripped ...]' ,
68
+ ' ...' ,
69
+ 'not ok 9 number strictEqual to string' ,
70
+ ' ---' ,
71
+ ' operator: equal' ,
72
+ ' expected: \'3\'' ,
73
+ ' actual: 3' ,
74
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
75
+ ' stack: |-' ,
76
+ ' Error: number strictEqual to string' ,
77
+ ' [... stack stripped ...]' ,
78
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
79
+ ' [... stack stripped ...]' ,
80
+ ' ...' ,
81
+ 'not ok 10 string strictEqual to number' ,
82
+ ' ---' ,
83
+ ' operator: equal' ,
84
+ ' expected: 3' ,
85
+ ' actual: \'3\'' ,
86
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
87
+ ' stack: |-' ,
88
+ ' Error: string strictEqual to number' ,
89
+ ' [... stack stripped ...]' ,
90
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
91
+ ' [... stack stripped ...]' ,
92
+ ' ...' ,
93
+ 'ok 11 number notStrictEqual to string' ,
94
+ 'ok 12 string notStrictEqual to number' ,
95
+ 'ok 13 number deepLooseEqual to string' ,
96
+ 'ok 14 string deepLooseEqual to number' ,
97
+ 'not ok 15 number notDeepLooseEqual to string' ,
98
+ ' ---' ,
99
+ ' operator: notDeepLooseEqual' ,
100
+ ' expected: \'3\'' ,
101
+ ' actual: 3' ,
102
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
103
+ ' stack: |-' ,
104
+ ' Error: number notDeepLooseEqual to string' ,
105
+ ' [... stack stripped ...]' ,
106
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
107
+ ' [... stack stripped ...]' ,
108
+ ' ...' ,
109
+ 'not ok 16 string notDeepLooseEqual to number' ,
110
+ ' ---' ,
111
+ ' operator: notDeepLooseEqual' ,
112
+ ' expected: 3' ,
113
+ ' actual: \'3\'' ,
114
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
115
+ ' stack: |-' ,
116
+ ' Error: string notDeepLooseEqual to number' ,
117
+ ' [... stack stripped ...]' ,
118
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
119
+ ' [... stack stripped ...]' ,
120
+ ' ...' ,
121
+ 'not ok 17 number deepEqual to string' ,
122
+ ' ---' ,
123
+ ' operator: deepEqual' ,
124
+ ' expected: \'3\'' ,
125
+ ' actual: 3' ,
126
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
127
+ ' stack: |-' ,
128
+ ' Error: number deepEqual to string' ,
129
+ ' [... stack stripped ...]' ,
130
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
131
+ ' [... stack stripped ...]' ,
132
+ ' ...' ,
133
+ 'not ok 18 string deepEqual to number' ,
134
+ ' ---' ,
135
+ ' operator: deepEqual' ,
136
+ ' expected: 3' ,
137
+ ' actual: \'3\'' ,
138
+ ' at: Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
139
+ ' stack: |-' ,
140
+ ' Error: string deepEqual to number' ,
141
+ ' [... stack stripped ...]' ,
142
+ ' at Test.<anonymous> ($TEST/numerics.js:$LINE:$COL)' ,
143
+ ' [... stack stripped ...]' ,
144
+ ' ...' ,
145
+ 'ok 19 number notDeepEqual to string' ,
146
+ 'ok 20 string notDeepEqual to number' ,
147
+ '' ,
148
+ '1..20' ,
149
+ '# tests 20' ,
150
+ '# pass 10' ,
151
+ '# fail 10' ,
152
+ ''
153
+ ] ) ;
153
154
} ) ) ;
154
155
155
156
test ( 'numeric strings' , function ( t ) {
0 commit comments