supertape 9.3.0 → 9.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,14 @@
1
+ 2024.01.05, v9.5.0
2
+
3
+ feature:
4
+ - 3abf553 supertape: operator: improve fail message when operator returns function
5
+ - 74893c0 supertape: c8 v9.0.0
6
+
7
+ 2023.12.28, v9.4.0
8
+
9
+ feature:
10
+ - 600c6fb supertape: format: add aditional check to call async operators with await
11
+
1
12
  2023.12.28, v9.3.0
2
13
 
3
14
  fix:
package/lib/format.js CHANGED
@@ -13,6 +13,9 @@ module.exports.parseAt = (stack, {reason}) => {
13
13
 
14
14
  const line = lines[reason === 'user' ? REASON_USER : REASON_EXCEPTION];
15
15
 
16
+ if (!line)
17
+ throw Error(`☝️ Looks like 'async' operator called without 'await': ${stack}`);
18
+
16
19
  return line.trim();
17
20
  };
18
21
 
package/lib/operators.mjs CHANGED
@@ -240,12 +240,12 @@ function validateEnd({name, operators, runnerState}) {
240
240
 
241
241
  const validate = (a) => {
242
242
  if (isFn(a))
243
- return fail('looks like operator returns function, it will always fail');
243
+ return fail(`☝️ Looks like operator returns function, it will always fail: '${a}'`);
244
244
 
245
245
  return a;
246
246
  };
247
247
 
248
- const returnMissing = () => fail('looks like operator returns nothing, it will always fail');
248
+ const returnMissing = () => fail('☝️ Looks like operator returns nothing, it will always fail');
249
249
 
250
250
  function run(name, {formatter, count, incCount, incPassed, incFailed}, testState = returnMissing()) {
251
251
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "9.3.0",
3
+ "version": "9.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",
@@ -76,7 +76,7 @@
76
76
  "devDependencies": {
77
77
  "@babel/core": "^7.12.9",
78
78
  "@iocmd/wait": "^2.1.0",
79
- "c8": "^8.0.0",
79
+ "c8": "^9.0.0",
80
80
  "check-dts": "^0.7.0",
81
81
  "currify": "^4.0.0",
82
82
  "eslint": "^8.0.0",