supertape 8.7.0 → 8.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 +10 -0
- package/README.md +3 -3
- package/lib/operators.mjs +8 -1
- package/package.json +2 -2
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
📼 **Supertape** doesn't contain:
|
|
33
33
|
|
|
34
34
|
- assertion aliases, making the available operators far more concise
|
|
35
|
-
- `es3 code` and lot's of [ponyfills](https://github.com/sindresorhus/ponyfill#how-are-ponyfills-better-than-polyfills)
|
|
36
|
-
- `t.throws()`, `t.doesNotThrow()` - use [**tryCatch**](https://github.com/coderaiser/try-catch) or [**tryToCatch**](https://github.com/coderaiser/try-to-catch) with [`t.equal()`](#tequalresult-any-expected-any-message-string) instead
|
|
37
|
-
- [`t.plan()`](https://github.com/substack/tape#tplann)
|
|
35
|
+
- `es3 code` and lot's of [ponyfills](https://github.com/sindresorhus/ponyfill#how-are-ponyfills-better-than-polyfills);
|
|
36
|
+
- `t.throws()`, `t.doesNotThrow()` - use [**tryCatch**](https://github.com/coderaiser/try-catch) or [**tryToCatch**](https://github.com/coderaiser/try-to-catch) with [`t.equal()`](#tequalresult-any-expected-any-message-string) instead;
|
|
37
|
+
- [`t.plan()`](https://github.com/substack/tape#tplann);
|
|
38
38
|
|
|
39
39
|
For a list of all built-in assertions, see [Operators](#operators).
|
|
40
40
|
|
package/lib/operators.mjs
CHANGED
|
@@ -7,7 +7,14 @@ import {
|
|
|
7
7
|
|
|
8
8
|
const {entries} = Object;
|
|
9
9
|
const isAsync = (a) => a[Symbol.toStringTag] === 'AsyncFunction';
|
|
10
|
-
const
|
|
10
|
+
const encode = (a) => a.replace(')', '\\)').replace('(', '\\(');
|
|
11
|
+
|
|
12
|
+
const maybeRegExp = (a) => {
|
|
13
|
+
if (!isStr(a))
|
|
14
|
+
return a;
|
|
15
|
+
|
|
16
|
+
return RegExp(encode(a));
|
|
17
|
+
};
|
|
11
18
|
|
|
12
19
|
const isFn = (a) => typeof a === 'function';
|
|
13
20
|
const isStr = (a) => typeof a === 'string';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supertape",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.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",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"cli-progress": "^3.8.2",
|
|
53
53
|
"deep-equal": "^2.0.3",
|
|
54
54
|
"fullstore": "^3.0.0",
|
|
55
|
-
"glob": "^
|
|
55
|
+
"glob": "^10.3.10",
|
|
56
56
|
"jest-diff": "^29.0.1",
|
|
57
57
|
"once": "^1.4.0",
|
|
58
58
|
"resolve": "^1.17.0",
|