poku 2.6.1 → 2.6.2-canary.3ed7e77
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/lib/configs/poku.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { DescribeOptions } from '../../@types/describe.js';
|
|
2
|
-
import { skip } from './modifiers.js';
|
|
2
|
+
import { todo, skip } from './modifiers.js';
|
|
3
3
|
declare function describeCore(title: string, cb: () => Promise<unknown>): Promise<void>;
|
|
4
4
|
declare function describeCore(title: string, cb: () => unknown): void;
|
|
5
5
|
declare function describeCore(cb: () => Promise<unknown>): Promise<void>;
|
|
6
6
|
declare function describeCore(cb: () => unknown): unknown;
|
|
7
7
|
declare function describeCore(title: string, options?: DescribeOptions): void;
|
|
8
8
|
export declare const describe: typeof describeCore & {
|
|
9
|
-
todo:
|
|
9
|
+
todo: typeof todo;
|
|
10
10
|
skip: typeof skip;
|
|
11
11
|
};
|
|
12
12
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { skip } from '../modifiers.js';
|
|
1
|
+
import { todo, skip } from '../modifiers.js';
|
|
2
2
|
declare function itCore(message: string, cb: () => Promise<unknown>): Promise<void>;
|
|
3
3
|
declare function itCore(message: string, cb: () => unknown): void;
|
|
4
4
|
declare function itCore(cb: () => Promise<unknown>): Promise<void>;
|
|
5
5
|
declare function itCore(cb: () => unknown): void;
|
|
6
6
|
export declare const it: typeof itCore & {
|
|
7
|
-
todo:
|
|
7
|
+
todo: typeof todo;
|
|
8
8
|
skip: typeof skip;
|
|
9
9
|
};
|
|
10
10
|
export {};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function todo(message: string): void;
|
|
2
|
+
export declare function todo(message: string, _cb?: () => Promise<unknown>): Promise<void>;
|
|
3
|
+
export declare function todo(message: string, _cb?: () => unknown): void;
|
|
4
|
+
export declare function skip(message: string, _cb: () => Promise<unknown>): Promise<void>;
|
|
2
5
|
export declare function skip(message: string, _cb: () => unknown): void;
|
|
6
|
+
export declare function skip(_cb: () => Promise<unknown>): Promise<void>;
|
|
3
7
|
export declare function skip(_cb: () => unknown): void;
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.todo =
|
|
3
|
+
exports.todo = todo;
|
|
4
4
|
exports.skip = skip;
|
|
5
5
|
const write_js_1 = require("../../services/write.js");
|
|
6
6
|
const indentation_js_1 = require("../../configs/indentation.js");
|
|
7
7
|
const format_js_1 = require("../../services/format.js");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
async function todo(message, _cb) {
|
|
9
|
+
write_js_1.Write.log(`${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`● ${message}`).cyan().bold()}`);
|
|
10
|
+
|
|
11
|
+
if (typeof _cb === 'function') {
|
|
12
|
+
const isAsync = _cb.constructor.name === 'AsyncFunction';
|
|
13
|
+
if (isAsync)
|
|
14
|
+
return await Promise.resolve();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
async function skip(messageOrCb, _cb) {
|
|
11
20
|
const message = (typeof messageOrCb === 'string' && messageOrCb) || 'Skipping';
|
|
12
21
|
write_js_1.Write.log(`${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`◯ ${message}`).info().bold()}`);
|
|
22
|
+
|
|
23
|
+
if (typeof messageOrCb === 'function') {
|
|
24
|
+
const isAsync = messageOrCb.constructor.name === 'AsyncFunction';
|
|
25
|
+
if (isAsync)
|
|
26
|
+
return await Promise.resolve();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (typeof _cb === 'function') {
|
|
30
|
+
const isAsync = _cb.constructor.name === 'AsyncFunction';
|
|
31
|
+
if (isAsync)
|
|
32
|
+
return await Promise.resolve();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
13
36
|
}
|