@sprucelabs/test 7.7.359 → 7.7.360
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/build/AssertionError.d.ts +3 -0
- package/build/AssertionError.js +3 -0
- package/build/StackCleaner.d.ts +3 -0
- package/build/StackCleaner.js +3 -0
- package/build/assert.d.ts +3 -0
- package/build/assert.js +3 -0
- package/build/decorators.d.ts +3 -1
- package/build/decorators.js +12 -4
- package/build/esm/AssertionError.d.ts +3 -0
- package/build/esm/AssertionError.js +3 -0
- package/build/esm/StackCleaner.d.ts +3 -0
- package/build/esm/StackCleaner.js +3 -0
- package/build/esm/assert.d.ts +3 -0
- package/build/esm/assert.js +3 -0
- package/build/esm/decorators.d.ts +3 -1
- package/build/esm/decorators.js +12 -4
- package/build/esm/utilities/assert.utility.d.ts +3 -0
- package/build/esm/utilities/assert.utility.js +3 -0
- package/build/utilities/assert.utility.d.ts +3 -0
- package/build/utilities/assert.utility.js +3 -0
- package/package.json +1 -1
package/build/AssertionError.js
CHANGED
|
@@ -4,6 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const StackCleaner_1 = __importDefault(require("./StackCleaner"));
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
9
|
+
*/
|
|
7
10
|
class AssertionError extends Error {
|
|
8
11
|
constructor(message, stack) {
|
|
9
12
|
var _a;
|
package/build/StackCleaner.d.ts
CHANGED
package/build/StackCleaner.js
CHANGED
package/build/assert.d.ts
CHANGED
|
@@ -40,5 +40,8 @@ export interface ISpruceAssert {
|
|
|
40
40
|
doesThrowAsync(cb: () => any | Promise<any>, matcher?: string | RegExp | undefined, msg?: string | undefined): Promise<Error>;
|
|
41
41
|
fail(message?: string): void;
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
45
|
+
*/
|
|
43
46
|
declare const spruceAssert: ISpruceAssert;
|
|
44
47
|
export default spruceAssert;
|
package/build/assert.js
CHANGED
|
@@ -12,6 +12,9 @@ const variable_diff_1 = __importDefault(require("variable-diff"));
|
|
|
12
12
|
const assert_utility_1 = __importDefault(require("./utilities/assert.utility"));
|
|
13
13
|
const stringify = assert_utility_1.default.stringify.bind(assert_utility_1.default);
|
|
14
14
|
function isExactType(_) { }
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
17
|
+
*/
|
|
15
18
|
const spruceAssert = {
|
|
16
19
|
areSameType() { },
|
|
17
20
|
isType: ts_expect_1.expectType,
|
package/build/decorators.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
3
|
+
*/
|
|
2
4
|
declare function test(description?: string, ...args: any[]): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
3
5
|
declare namespace test {
|
|
4
6
|
var only: (description?: string | undefined, ...args: any[]) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
package/build/decorators.js
CHANGED
|
@@ -21,7 +21,9 @@ function hookupTestClass(target) {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
26
|
+
*/
|
|
25
27
|
function test(description, ...args) {
|
|
26
28
|
return function (target, propertyKey, descriptor) {
|
|
27
29
|
// Lets attach before/after
|
|
@@ -39,7 +41,9 @@ function test(description, ...args) {
|
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
exports.default = test;
|
|
42
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
46
|
+
*/
|
|
43
47
|
test.only = (description, ...args) => {
|
|
44
48
|
return function (target, propertyKey, descriptor) {
|
|
45
49
|
// Lets attach before/after
|
|
@@ -51,7 +55,9 @@ test.only = (description, ...args) => {
|
|
|
51
55
|
});
|
|
52
56
|
};
|
|
53
57
|
};
|
|
54
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
60
|
+
*/
|
|
55
61
|
test.todo = (description, ..._args) => {
|
|
56
62
|
return function (target, propertyKey) {
|
|
57
63
|
// Lets attach before/after
|
|
@@ -60,7 +66,9 @@ test.todo = (description, ..._args) => {
|
|
|
60
66
|
it.todo(description !== null && description !== void 0 ? description : propertyKey);
|
|
61
67
|
};
|
|
62
68
|
};
|
|
63
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
71
|
+
*/
|
|
64
72
|
test.skip = (description, ...args) => {
|
|
65
73
|
return function (target, propertyKey, descriptor) {
|
|
66
74
|
// Lets attach before/after
|
package/build/esm/assert.d.ts
CHANGED
|
@@ -40,5 +40,8 @@ export interface ISpruceAssert {
|
|
|
40
40
|
doesThrowAsync(cb: () => any | Promise<any>, matcher?: string | RegExp | undefined, msg?: string | undefined): Promise<Error>;
|
|
41
41
|
fail(message?: string): void;
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
45
|
+
*/
|
|
43
46
|
declare const spruceAssert: ISpruceAssert;
|
|
44
47
|
export default spruceAssert;
|
package/build/esm/assert.js
CHANGED
|
@@ -16,6 +16,9 @@ import diff from 'variable-diff';
|
|
|
16
16
|
import assertUtil from './utilities/assert.utility.js';
|
|
17
17
|
const stringify = assertUtil.stringify.bind(assertUtil);
|
|
18
18
|
function isExactType(_) { }
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
21
|
+
*/
|
|
19
22
|
const spruceAssert = {
|
|
20
23
|
areSameType() { },
|
|
21
24
|
isType: expectType,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
3
|
+
*/
|
|
2
4
|
declare function test(description?: string, ...args: any[]): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
3
5
|
declare namespace test {
|
|
4
6
|
var only: (description?: string | undefined, ...args: any[]) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
package/build/esm/decorators.js
CHANGED
|
@@ -28,7 +28,9 @@ function hookupTestClass(target) {
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
33
|
+
*/
|
|
32
34
|
export default function test(description, ...args) {
|
|
33
35
|
return function (target, propertyKey, descriptor) {
|
|
34
36
|
// Lets attach before/after
|
|
@@ -45,7 +47,9 @@ export default function test(description, ...args) {
|
|
|
45
47
|
}));
|
|
46
48
|
};
|
|
47
49
|
}
|
|
48
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
52
|
+
*/
|
|
49
53
|
test.only = (description, ...args) => {
|
|
50
54
|
return function (target, propertyKey, descriptor) {
|
|
51
55
|
// Lets attach before/after
|
|
@@ -57,7 +61,9 @@ test.only = (description, ...args) => {
|
|
|
57
61
|
}));
|
|
58
62
|
};
|
|
59
63
|
};
|
|
60
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
66
|
+
*/
|
|
61
67
|
test.todo = (description, ..._args) => {
|
|
62
68
|
return function (target, propertyKey) {
|
|
63
69
|
// Lets attach before/after
|
|
@@ -66,7 +72,9 @@ test.todo = (description, ..._args) => {
|
|
|
66
72
|
it.todo(description !== null && description !== void 0 ? description : propertyKey);
|
|
67
73
|
};
|
|
68
74
|
};
|
|
69
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
77
|
+
*/
|
|
70
78
|
test.skip = (description, ...args) => {
|
|
71
79
|
return function (target, propertyKey, descriptor) {
|
|
72
80
|
// Lets attach before/after
|
|
@@ -3,6 +3,9 @@ export declare const UNDEFINED_PLACEHOLDER = "_____________undefined____________
|
|
|
3
3
|
export declare const FUNCTION_PLACEHOLDER = "_____________function_____________";
|
|
4
4
|
export declare const CIRCULAR_PLACEHOLDER = "_____________circular_____________";
|
|
5
5
|
export declare const NULL_PLACEHOLDER = "_____________null_____________";
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
8
|
+
*/
|
|
6
9
|
declare const assertUtil: {
|
|
7
10
|
fail(message?: string, stack?: string): never;
|
|
8
11
|
stringify(object: any): string;
|
|
@@ -8,6 +8,9 @@ export const UNDEFINED_PLACEHOLDER = '_____________undefined_____________';
|
|
|
8
8
|
export const FUNCTION_PLACEHOLDER = '_____________function_____________';
|
|
9
9
|
export const CIRCULAR_PLACEHOLDER = '_____________circular_____________';
|
|
10
10
|
export const NULL_PLACEHOLDER = '_____________null_____________';
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
13
|
+
*/
|
|
11
14
|
const assertUtil = {
|
|
12
15
|
fail(message, stack) {
|
|
13
16
|
throw new AssertionError(message !== null && message !== void 0 ? message : 'Fail!', stack);
|
|
@@ -3,6 +3,9 @@ export declare const UNDEFINED_PLACEHOLDER = "_____________undefined____________
|
|
|
3
3
|
export declare const FUNCTION_PLACEHOLDER = "_____________function_____________";
|
|
4
4
|
export declare const CIRCULAR_PLACEHOLDER = "_____________circular_____________";
|
|
5
5
|
export declare const NULL_PLACEHOLDER = "_____________null_____________";
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
8
|
+
*/
|
|
6
9
|
declare const assertUtil: {
|
|
7
10
|
fail(message?: string, stack?: string): never;
|
|
8
11
|
stringify(object: any): string;
|
|
@@ -14,6 +14,9 @@ exports.UNDEFINED_PLACEHOLDER = '_____________undefined_____________';
|
|
|
14
14
|
exports.FUNCTION_PLACEHOLDER = '_____________function_____________';
|
|
15
15
|
exports.CIRCULAR_PLACEHOLDER = '_____________circular_____________';
|
|
16
16
|
exports.NULL_PLACEHOLDER = '_____________null_____________';
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated delete and re-import from @sprucelabs/test-utils
|
|
19
|
+
*/
|
|
17
20
|
const assertUtil = {
|
|
18
21
|
fail(message, stack) {
|
|
19
22
|
throw new AssertionError_1.default(message !== null && message !== void 0 ? message : 'Fail!', stack);
|