supertape 11.4.0 → 11.5.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 CHANGED
@@ -1,3 +1,8 @@
1
+ 2025.12.29, v11.5.0
2
+
3
+ fix:
4
+ - 3cc177f supertape: operators: notOk: function
5
+
1
6
  2025.12.10, v11.4.0
2
7
 
3
8
  feature:
package/lib/operators.mjs CHANGED
@@ -47,7 +47,12 @@ const validateRegExp = (regexp) => {
47
47
  return null;
48
48
  };
49
49
 
50
- const {stringify} = JSON;
50
+ const stringify = (a) => {
51
+ if (isFn(a))
52
+ return a.toString();
53
+
54
+ return JSON.stringify(a);
55
+ };
51
56
 
52
57
  function match(result, regexp, message = 'should match') {
53
58
  const error = validateRegExp(regexp);
@@ -1,6 +1,6 @@
1
1
  import {OperatorStub} from '@supertape/operator-stub';
2
- import {stub, Stub} from '@cloudcmd/stub';
3
2
 
3
+ export {Stub, stub} from '@cloudcmd/stub';
4
4
  type OperationBaseResult = {
5
5
  is: boolean;
6
6
  expected: unknown;
@@ -55,8 +55,6 @@ declare function extend(customOperator: CustomOperator): typeof test;
55
55
  export {
56
56
  test,
57
57
  Test,
58
- stub,
59
- Stub,
60
58
  extend,
61
59
  OperationResult,
62
60
  };
@@ -10,7 +10,7 @@ module.exports.CONSOLE_ERROR = CONSOLE_ERROR;
10
10
  module.exports.CONSOLE_LOG = CONSOLE_LOG;
11
11
  module.exports.SPLITTER = SPLITTER;
12
12
 
13
- module.exports.overrideConsoleLog = (parentPort, {console = global.console} = {}) => {
13
+ module.exports.overrideConsoleLog = (parentPort, {console = globalThis.console} = {}) => {
14
14
  const {log} = console;
15
15
 
16
16
  console.log = createConsoleMethod(CONSOLE_LOG, parentPort);
@@ -21,7 +21,7 @@ module.exports.overrideConsoleLog = (parentPort, {console = global.console} = {}
21
21
  };
22
22
  };
23
23
 
24
- module.exports.overrideConsoleError = (parentPort, {console = global.console} = {}) => {
24
+ module.exports.overrideConsoleError = (parentPort, {console = globalThis.console} = {}) => {
25
25
  const {error} = console;
26
26
 
27
27
  console.error = createConsoleMethod(CONSOLE_ERROR, parentPort);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "11.4.0",
3
+ "version": "11.5.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",