tape-six 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +4 -4
- package/src/State.js +10 -7
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@ If you are familiar with other TAP-based libraries you'll feel right at home.
|
|
|
32
32
|
|
|
33
33
|
The most recent releases:
|
|
34
34
|
|
|
35
|
+
* 0.12.0 *Removed data to avoid serializing non-serializable objects.*
|
|
35
36
|
* 0.11.0 *Minor improvements to the server: temporary redirects, a hyperlink to the web app.*
|
|
36
37
|
* 0.10.0 *Refactored test runners, refactored stopping tests on failure, added JSONL reporter, fixed bugs.*
|
|
37
38
|
* 0.9.6 *Updated deps.*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tape-six",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "TAP the test harness for the modern JavaScript (ES6).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"build": "npm run copyDeep6",
|
|
22
22
|
"prepublishOnly": "npm run build",
|
|
23
23
|
"test": "node ./bin/tape6.js --flags FO",
|
|
24
|
-
"test
|
|
25
|
-
"test
|
|
26
|
-
"test
|
|
24
|
+
"test:bun": "bun run ./bin/tape6-bun.js --flags FO",
|
|
25
|
+
"test:deno": "deno run -A ./bin/tape6-deno.js --flags FO",
|
|
26
|
+
"test:chrome": "node tests/puppeteer-chrome.js"
|
|
27
27
|
},
|
|
28
28
|
"github": "http://github.com/uhop/tape-six",
|
|
29
29
|
"repository": {
|
package/src/State.js
CHANGED
|
@@ -113,12 +113,14 @@ class State {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
if (event.type === 'assert' && event.data) {
|
|
116
|
-
typeof event.expected != 'string' &&
|
|
117
|
-
event.data.
|
|
118
|
-
|
|
119
|
-
typeof event.
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
if (typeof event.expected != 'string' && event.data.hasOwnProperty('expected')) {
|
|
117
|
+
event.expected = serialize(event.data.expected);
|
|
118
|
+
}
|
|
119
|
+
if (typeof event.expected == 'string') delete event.data.expected;
|
|
120
|
+
if (typeof event.actual != 'string' && event.data.hasOwnProperty('actual')) {
|
|
121
|
+
event.actual = serialize(event.data.actual);
|
|
122
|
+
}
|
|
123
|
+
if (typeof event.actual == 'string') delete event.data.actual;
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
switch (event.type) {
|
|
@@ -142,7 +144,8 @@ class State {
|
|
|
142
144
|
|
|
143
145
|
switch (event.type) {
|
|
144
146
|
case 'assert':
|
|
145
|
-
if (event.stopTest && event.operator !== 'exception')
|
|
147
|
+
if (event.stopTest && event.operator !== 'exception')
|
|
148
|
+
throw new StopTest('failOnce is activated');
|
|
146
149
|
this.time = this.timer.now();
|
|
147
150
|
break;
|
|
148
151
|
case 'bail-out':
|