supertape 10.8.0 → 10.9.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/ChangeLog +6 -0
- package/lib/operators.mjs +4 -1
- package/lib/worker/create-console-log.js +8 -1
- package/package.json +2 -2
package/ChangeLog
CHANGED
package/lib/operators.mjs
CHANGED
|
@@ -4,7 +4,10 @@ import {formatOutput, parseAt} from './format.js';
|
|
|
4
4
|
|
|
5
5
|
const {entries} = Object;
|
|
6
6
|
const isAsync = (a) => a[Symbol.toStringTag] === 'AsyncFunction';
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
const encode = (a) => a
|
|
9
|
+
.replace(')', '\\)')
|
|
10
|
+
.replace('(', '\\(');
|
|
8
11
|
|
|
9
12
|
const maybeRegExp = (a) => {
|
|
10
13
|
if (!isStr(a))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const {stringify} = require('flatted');
|
|
4
|
+
const isError = (a) => a instanceof Error;
|
|
4
5
|
const SPLITTER = '>[supertape-splitter]<';
|
|
5
6
|
const CONSOLE_LOG = 'console:log';
|
|
6
7
|
const CONSOLE_ERROR = 'console:error';
|
|
@@ -34,8 +35,14 @@ module.exports.overrideConsoleError = (parentPort, {console = global.console} =
|
|
|
34
35
|
const createConsoleMethod = (type, parentPort) => (...messages) => {
|
|
35
36
|
const prepared = [];
|
|
36
37
|
|
|
37
|
-
for (const message of messages)
|
|
38
|
+
for (const message of messages) {
|
|
39
|
+
if (isError(message)) {
|
|
40
|
+
prepared.push(stringify(message.toString()));
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
|
|
38
44
|
prepared.push(stringify(message));
|
|
45
|
+
}
|
|
39
46
|
|
|
40
47
|
parentPort.postMessage([
|
|
41
48
|
type, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supertape",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.9.0",
|
|
4
4
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
5
|
"description": "📼 Supertape simplest high speed test runner with superpowers",
|
|
6
6
|
"homepage": "http://github.com/coderaiser/supertape",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"montag": "^1.0.0",
|
|
88
88
|
"nodemon": "^3.0.1",
|
|
89
89
|
"pullout": "^5.0.1",
|
|
90
|
-
"putout": "^
|
|
90
|
+
"putout": "^37.8.2",
|
|
91
91
|
"runsome": "^1.0.0",
|
|
92
92
|
"try-catch": "^3.0.1",
|
|
93
93
|
"typescript": "^5.1.6"
|