poku 2.6.1 → 2.6.2-canary.d9851de

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.
@@ -7,4 +7,4 @@ exports.results = {
7
7
  skip: 0,
8
8
  todo: 0,
9
9
  };
10
- exports.VERSION = '2.6.1';
10
+ exports.VERSION = '2.6.2-canary.d9851de';
@@ -1,3 +1,5 @@
1
1
  export declare const todo: (message: string, _cb?: () => unknown) => boolean;
2
+ export declare function skip(message: string, _cb: () => Promise<unknown>): Promise<void>;
2
3
  export declare function skip(message: string, _cb: () => unknown): void;
4
+ export declare function skip(_cb: () => Promise<unknown>): Promise<void>;
3
5
  export declare function skip(_cb: () => unknown): void;
@@ -7,7 +7,21 @@ const indentation_js_1 = require("../../configs/indentation.js");
7
7
  const format_js_1 = require("../../services/format.js");
8
8
  const todo = (message, _cb) => write_js_1.Write.log(`${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`● ${message}`).cyan().bold()}`);
9
9
  exports.todo = todo;
10
- function skip(messageOrCb, _cb) {
10
+ async function skip(messageOrCb, _cb) {
11
11
  const message = (typeof messageOrCb === 'string' && messageOrCb) || 'Skipping';
12
12
  write_js_1.Write.log(`${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`◯ ${message}`).info().bold()}`);
13
+
14
+ if (typeof messageOrCb === 'function') {
15
+ const isAsync = messageOrCb.constructor.name === 'AsyncFunction';
16
+ if (isAsync)
17
+ return await Promise.resolve();
18
+ return;
19
+ }
20
+ if (typeof _cb === 'function') {
21
+ const isAsync = _cb.constructor.name === 'AsyncFunction';
22
+ if (isAsync)
23
+ return await Promise.resolve();
24
+ return;
25
+ }
26
+
13
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poku",
3
- "version": "2.6.1",
3
+ "version": "2.6.2-canary.d9851de",
4
4
  "description": "🐷 Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.",
5
5
  "main": "./lib/modules/index.js",
6
6
  "license": "MIT",