@xylabs/jest-helpers 2.9.3 → 2.10.1
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/dist/index.d.mts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +29 -15
- package/tsup.config.ts +16 -0
- package/dist/cjs/describeIf.js +0 -11
- package/dist/cjs/describeIf.js.map +0 -1
- package/dist/cjs/index.js +0 -7
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/itIf.js +0 -11
- package/dist/cjs/itIf.js.map +0 -1
- package/dist/cjs/testIf.js +0 -11
- package/dist/cjs/testIf.js.map +0 -1
- package/dist/docs.json +0 -408
- package/dist/esm/describeIf.js +0 -7
- package/dist/esm/describeIf.js.map +0 -1
- package/dist/esm/index.js +0 -4
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/itIf.js +0 -7
- package/dist/esm/itIf.js.map +0 -1
- package/dist/esm/testIf.js +0 -7
- package/dist/esm/testIf.js.map +0 -1
- package/dist/types/describeIf.d.ts +0 -8
- package/dist/types/describeIf.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/itIf.d.ts +0 -8
- package/dist/types/itIf.d.ts.map +0 -1
- package/dist/types/testIf.d.ts +0 -8
- package/dist/types/testIf.d.ts.map +0 -1
- package/docs/assets/highlight.css +0 -50
- package/docs/assets/main.js +0 -58
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1367
- package/docs/functions/describeIf.html +0 -64
- package/docs/functions/itIf.html +0 -64
- package/docs/functions/testIf.html +0 -64
- package/docs/index.html +0 -84
- package/docs/modules.html +0 -46
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conditionally runs or skips the describe
|
|
3
|
+
* @param expr The condition to evaluate
|
|
4
|
+
* @returns If the condition is true, describe, otherwise skips
|
|
5
|
+
*/
|
|
6
|
+
declare const describeIf: <T>(expr?: T | null | undefined) => jest.Describe;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Conditionally runs or skips the it
|
|
10
|
+
* @param expr The condition to evaluate
|
|
11
|
+
* @returns If the condition is true, it, otherwise skips
|
|
12
|
+
*/
|
|
13
|
+
declare const itIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Conditionally runs or skips the test
|
|
17
|
+
* @param expr The condition to evaluate
|
|
18
|
+
* @returns If the condition is true, test, otherwise skips
|
|
19
|
+
*/
|
|
20
|
+
declare const testIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
21
|
+
|
|
22
|
+
export { describeIf, itIf, testIf };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conditionally runs or skips the describe
|
|
3
|
+
* @param expr The condition to evaluate
|
|
4
|
+
* @returns If the condition is true, describe, otherwise skips
|
|
5
|
+
*/
|
|
6
|
+
declare const describeIf: <T>(expr?: T | null | undefined) => jest.Describe;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Conditionally runs or skips the it
|
|
10
|
+
* @param expr The condition to evaluate
|
|
11
|
+
* @returns If the condition is true, it, otherwise skips
|
|
12
|
+
*/
|
|
13
|
+
declare const itIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Conditionally runs or skips the test
|
|
17
|
+
* @param expr The condition to evaluate
|
|
18
|
+
* @returns If the condition is true, test, otherwise skips
|
|
19
|
+
*/
|
|
20
|
+
declare const testIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
21
|
+
|
|
22
|
+
export { describeIf, itIf, testIf };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
describeIf: () => describeIf,
|
|
24
|
+
itIf: () => itIf,
|
|
25
|
+
testIf: () => testIf
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(src_exports);
|
|
28
|
+
|
|
29
|
+
// src/describeIf.ts
|
|
30
|
+
var describeIf = (expr) => expr ? describe : describe.skip;
|
|
31
|
+
|
|
32
|
+
// src/itIf.ts
|
|
33
|
+
var itIf = (expr) => expr ? it : it.skip;
|
|
34
|
+
|
|
35
|
+
// src/testIf.ts
|
|
36
|
+
var testIf = (expr) => expr ? test : test.skip;
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
describeIf,
|
|
40
|
+
itIf,
|
|
41
|
+
testIf
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/describeIf.ts","../src/itIf.ts","../src/testIf.ts"],"sourcesContent":["export * from './describeIf'\nexport * from './itIf'\nexport * from './testIf'\n","/**\n * Conditionally runs or skips the describe\n * @param expr The condition to evaluate\n * @returns If the condition is true, describe, otherwise skips\n */\nexport const describeIf = <T>(expr?: T | null) => (expr ? describe : describe.skip)\n","/**\n * Conditionally runs or skips the it\n * @param expr The condition to evaluate\n * @returns If the condition is true, it, otherwise skips\n */\nexport const itIf = <T>(expr?: T | null) => (expr ? it : it.skip)\n","/**\n * Conditionally runs or skips the test\n * @param expr The condition to evaluate\n * @returns If the condition is true, test, otherwise skips\n */\nexport const testIf = <T>(expr?: T | null) => (expr ? test : test.skip)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,aAAa,CAAI,SAAqB,OAAO,WAAW,SAAS;;;ACAvE,IAAM,OAAO,CAAI,SAAqB,OAAO,KAAK,GAAG;;;ACArD,IAAM,SAAS,CAAI,SAAqB,OAAO,OAAO,KAAK;","names":[]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/describeIf.ts
|
|
2
|
+
var describeIf = (expr) => expr ? describe : describe.skip;
|
|
3
|
+
|
|
4
|
+
// src/itIf.ts
|
|
5
|
+
var itIf = (expr) => expr ? it : it.skip;
|
|
6
|
+
|
|
7
|
+
// src/testIf.ts
|
|
8
|
+
var testIf = (expr) => expr ? test : test.skip;
|
|
9
|
+
export {
|
|
10
|
+
describeIf,
|
|
11
|
+
itIf,
|
|
12
|
+
testIf
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/describeIf.ts","../src/itIf.ts","../src/testIf.ts"],"sourcesContent":["/**\n * Conditionally runs or skips the describe\n * @param expr The condition to evaluate\n * @returns If the condition is true, describe, otherwise skips\n */\nexport const describeIf = <T>(expr?: T | null) => (expr ? describe : describe.skip)\n","/**\n * Conditionally runs or skips the it\n * @param expr The condition to evaluate\n * @returns If the condition is true, it, otherwise skips\n */\nexport const itIf = <T>(expr?: T | null) => (expr ? it : it.skip)\n","/**\n * Conditionally runs or skips the test\n * @param expr The condition to evaluate\n * @returns If the condition is true, test, otherwise skips\n */\nexport const testIf = <T>(expr?: T | null) => (expr ? test : test.skip)\n"],"mappings":";AAKO,IAAM,aAAa,CAAI,SAAqB,OAAO,WAAW,SAAS;;;ACAvE,IAAM,OAAO,CAAI,SAAqB,OAAO,KAAK,GAAG;;;ACArD,IAAM,SAAS,CAAI,SAAqB,OAAO,OAAO,KAAK;","names":[]}
|
package/package.json
CHANGED
|
@@ -11,28 +11,39 @@
|
|
|
11
11
|
"url": "https://github.com/xylabs/sdk-js/issues"
|
|
12
12
|
},
|
|
13
13
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
14
|
-
"browser": "dist/esm/index.js",
|
|
15
|
-
"main": "dist/cjs/index.js",
|
|
16
|
-
"module": "dist/esm/index.js",
|
|
17
14
|
"docs": "dist/docs.json",
|
|
18
|
-
"types": "dist/
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
19
16
|
"exports": {
|
|
20
17
|
".": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
18
|
+
"require": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
24
21
|
},
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
}
|
|
29
|
-
"default": "./dist/esm/index.js"
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/index.d.mts",
|
|
24
|
+
"default": "./dist/index.mjs"
|
|
25
|
+
}
|
|
30
26
|
},
|
|
31
27
|
"./dist/docs.json": {
|
|
32
28
|
"default": "./dist/docs.json"
|
|
33
29
|
},
|
|
30
|
+
"./cjs": {
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./docs": {
|
|
34
|
+
"default": "./dist/docs.json"
|
|
35
|
+
},
|
|
36
|
+
"./esm": {
|
|
37
|
+
"default": "./dist/index.mjs"
|
|
38
|
+
},
|
|
34
39
|
"./package.json": "./package.json"
|
|
35
40
|
},
|
|
41
|
+
"main": "dist/index.js",
|
|
42
|
+
"module": "dist/index.mjs",
|
|
43
|
+
"scripts": {
|
|
44
|
+
"package-compile": "tsup && publint",
|
|
45
|
+
"package-recompile": "tsup && publint"
|
|
46
|
+
},
|
|
36
47
|
"homepage": "https://xylabs.com",
|
|
37
48
|
"keywords": [
|
|
38
49
|
"xylabs",
|
|
@@ -41,8 +52,11 @@
|
|
|
41
52
|
"esm"
|
|
42
53
|
],
|
|
43
54
|
"devDependencies": {
|
|
44
|
-
"@xylabs/ts-scripts-yarn3": "^2.
|
|
45
|
-
"
|
|
55
|
+
"@xylabs/ts-scripts-yarn3": "^2.19.5",
|
|
56
|
+
"@xylabs/tsconfig": "^2.19.5",
|
|
57
|
+
"jest": "^29.6.4",
|
|
58
|
+
"publint": "^0.2.2",
|
|
59
|
+
"tsup": "^7.2.0"
|
|
46
60
|
},
|
|
47
61
|
"peerDependencies": {
|
|
48
62
|
"jest": "*"
|
|
@@ -55,5 +69,5 @@
|
|
|
55
69
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
56
70
|
},
|
|
57
71
|
"sideEffects": false,
|
|
58
|
-
"version": "2.
|
|
72
|
+
"version": "2.10.1"
|
|
59
73
|
}
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup'
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line import/no-default-export
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
bundle: true,
|
|
6
|
+
cjsInterop: true,
|
|
7
|
+
clean: true,
|
|
8
|
+
dts: {
|
|
9
|
+
entry: ['src/index.ts'],
|
|
10
|
+
},
|
|
11
|
+
entry: ['src/index.ts'],
|
|
12
|
+
format: ['cjs', 'esm'],
|
|
13
|
+
sourcemap: true,
|
|
14
|
+
splitting: false,
|
|
15
|
+
tsconfig: 'tsconfig.build.json',
|
|
16
|
+
})
|
package/dist/cjs/describeIf.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.describeIf = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Conditionally runs or skips the describe
|
|
6
|
-
* @param expr The condition to evaluate
|
|
7
|
-
* @returns If the condition is true, describe, otherwise skips
|
|
8
|
-
*/
|
|
9
|
-
const describeIf = (expr) => (expr ? describe : describe.skip);
|
|
10
|
-
exports.describeIf = describeIf;
|
|
11
|
-
//# sourceMappingURL=describeIf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"describeIf.js","sourceRoot":"","sources":["../../src/describeIf.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACI,MAAM,UAAU,GAAG,CAAI,IAAe,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;AAAtE,QAAA,UAAU,cAA4D"}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./describeIf"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./itIf"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./testIf"), exports);
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,iDAAsB;AACtB,mDAAwB"}
|
package/dist/cjs/itIf.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.itIf = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Conditionally runs or skips the it
|
|
6
|
-
* @param expr The condition to evaluate
|
|
7
|
-
* @returns If the condition is true, it, otherwise skips
|
|
8
|
-
*/
|
|
9
|
-
const itIf = (expr) => (expr ? it : it.skip);
|
|
10
|
-
exports.itIf = itIf;
|
|
11
|
-
//# sourceMappingURL=itIf.js.map
|
package/dist/cjs/itIf.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"itIf.js","sourceRoot":"","sources":["../../src/itIf.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACI,MAAM,IAAI,GAAG,CAAI,IAAe,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AAApD,QAAA,IAAI,QAAgD"}
|
package/dist/cjs/testIf.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.testIf = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Conditionally runs or skips the test
|
|
6
|
-
* @param expr The condition to evaluate
|
|
7
|
-
* @returns If the condition is true, test, otherwise skips
|
|
8
|
-
*/
|
|
9
|
-
const testIf = (expr) => (expr ? test : test.skip);
|
|
10
|
-
exports.testIf = testIf;
|
|
11
|
-
//# sourceMappingURL=testIf.js.map
|
package/dist/cjs/testIf.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testIf.js","sourceRoot":"","sources":["../../src/testIf.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACI,MAAM,MAAM,GAAG,CAAI,IAAe,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAA1D,QAAA,MAAM,UAAoD"}
|
package/dist/docs.json
DELETED
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": 0,
|
|
3
|
-
"name": "@xylabs/jest-helpers",
|
|
4
|
-
"variant": "project",
|
|
5
|
-
"kind": 1,
|
|
6
|
-
"flags": {},
|
|
7
|
-
"children": [
|
|
8
|
-
{
|
|
9
|
-
"id": 1,
|
|
10
|
-
"name": "describeIf",
|
|
11
|
-
"variant": "declaration",
|
|
12
|
-
"kind": 64,
|
|
13
|
-
"flags": {},
|
|
14
|
-
"sources": [
|
|
15
|
-
{
|
|
16
|
-
"fileName": "describeIf.ts",
|
|
17
|
-
"line": 6,
|
|
18
|
-
"character": 13,
|
|
19
|
-
"url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/jest-helpers/src/describeIf.ts#L6"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"signatures": [
|
|
23
|
-
{
|
|
24
|
-
"id": 2,
|
|
25
|
-
"name": "describeIf",
|
|
26
|
-
"variant": "signature",
|
|
27
|
-
"kind": 4096,
|
|
28
|
-
"flags": {},
|
|
29
|
-
"comment": {
|
|
30
|
-
"summary": [
|
|
31
|
-
{
|
|
32
|
-
"kind": "text",
|
|
33
|
-
"text": "Conditionally runs or skips the describe"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"blockTags": [
|
|
37
|
-
{
|
|
38
|
-
"tag": "@returns",
|
|
39
|
-
"content": [
|
|
40
|
-
{
|
|
41
|
-
"kind": "text",
|
|
42
|
-
"text": "If the condition is true, describe, otherwise skips"
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
"sources": [
|
|
49
|
-
{
|
|
50
|
-
"fileName": "describeIf.ts",
|
|
51
|
-
"line": 6,
|
|
52
|
-
"character": 26,
|
|
53
|
-
"url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/jest-helpers/src/describeIf.ts#L6"
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"typeParameter": [
|
|
57
|
-
{
|
|
58
|
-
"id": 3,
|
|
59
|
-
"name": "T",
|
|
60
|
-
"variant": "typeParam",
|
|
61
|
-
"kind": 131072,
|
|
62
|
-
"flags": {}
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"parameters": [
|
|
66
|
-
{
|
|
67
|
-
"id": 4,
|
|
68
|
-
"name": "expr",
|
|
69
|
-
"variant": "param",
|
|
70
|
-
"kind": 32768,
|
|
71
|
-
"flags": {
|
|
72
|
-
"isOptional": true
|
|
73
|
-
},
|
|
74
|
-
"comment": {
|
|
75
|
-
"summary": [
|
|
76
|
-
{
|
|
77
|
-
"kind": "text",
|
|
78
|
-
"text": "The condition to evaluate"
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
},
|
|
82
|
-
"type": {
|
|
83
|
-
"type": "union",
|
|
84
|
-
"types": [
|
|
85
|
-
{
|
|
86
|
-
"type": "literal",
|
|
87
|
-
"value": null
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"type": "reference",
|
|
91
|
-
"target": -1,
|
|
92
|
-
"name": "T",
|
|
93
|
-
"refersToTypeParameter": true
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
"type": {
|
|
100
|
-
"type": "reference",
|
|
101
|
-
"target": {
|
|
102
|
-
"sourceFileName": "../../node_modules/@types/jest/index.d.ts",
|
|
103
|
-
"qualifiedName": "jest.Describe"
|
|
104
|
-
},
|
|
105
|
-
"name": "Describe",
|
|
106
|
-
"package": "@types/jest",
|
|
107
|
-
"qualifiedName": "jest.Describe"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"id": 5,
|
|
114
|
-
"name": "itIf",
|
|
115
|
-
"variant": "declaration",
|
|
116
|
-
"kind": 64,
|
|
117
|
-
"flags": {},
|
|
118
|
-
"sources": [
|
|
119
|
-
{
|
|
120
|
-
"fileName": "itIf.ts",
|
|
121
|
-
"line": 6,
|
|
122
|
-
"character": 13,
|
|
123
|
-
"url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/jest-helpers/src/itIf.ts#L6"
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
"signatures": [
|
|
127
|
-
{
|
|
128
|
-
"id": 6,
|
|
129
|
-
"name": "itIf",
|
|
130
|
-
"variant": "signature",
|
|
131
|
-
"kind": 4096,
|
|
132
|
-
"flags": {},
|
|
133
|
-
"comment": {
|
|
134
|
-
"summary": [
|
|
135
|
-
{
|
|
136
|
-
"kind": "text",
|
|
137
|
-
"text": "Conditionally runs or skips the it"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
"blockTags": [
|
|
141
|
-
{
|
|
142
|
-
"tag": "@returns",
|
|
143
|
-
"content": [
|
|
144
|
-
{
|
|
145
|
-
"kind": "text",
|
|
146
|
-
"text": "If the condition is true, it, otherwise skips"
|
|
147
|
-
}
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
]
|
|
151
|
-
},
|
|
152
|
-
"sources": [
|
|
153
|
-
{
|
|
154
|
-
"fileName": "itIf.ts",
|
|
155
|
-
"line": 6,
|
|
156
|
-
"character": 20,
|
|
157
|
-
"url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/jest-helpers/src/itIf.ts#L6"
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"typeParameter": [
|
|
161
|
-
{
|
|
162
|
-
"id": 7,
|
|
163
|
-
"name": "T",
|
|
164
|
-
"variant": "typeParam",
|
|
165
|
-
"kind": 131072,
|
|
166
|
-
"flags": {}
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
"parameters": [
|
|
170
|
-
{
|
|
171
|
-
"id": 8,
|
|
172
|
-
"name": "expr",
|
|
173
|
-
"variant": "param",
|
|
174
|
-
"kind": 32768,
|
|
175
|
-
"flags": {
|
|
176
|
-
"isOptional": true
|
|
177
|
-
},
|
|
178
|
-
"comment": {
|
|
179
|
-
"summary": [
|
|
180
|
-
{
|
|
181
|
-
"kind": "text",
|
|
182
|
-
"text": "The condition to evaluate"
|
|
183
|
-
}
|
|
184
|
-
]
|
|
185
|
-
},
|
|
186
|
-
"type": {
|
|
187
|
-
"type": "union",
|
|
188
|
-
"types": [
|
|
189
|
-
{
|
|
190
|
-
"type": "literal",
|
|
191
|
-
"value": null
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"type": "reference",
|
|
195
|
-
"target": -1,
|
|
196
|
-
"name": "T",
|
|
197
|
-
"refersToTypeParameter": true
|
|
198
|
-
}
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
],
|
|
203
|
-
"type": {
|
|
204
|
-
"type": "reference",
|
|
205
|
-
"target": {
|
|
206
|
-
"sourceFileName": "../../node_modules/@types/jest/index.d.ts",
|
|
207
|
-
"qualifiedName": "jest.It"
|
|
208
|
-
},
|
|
209
|
-
"name": "It",
|
|
210
|
-
"package": "@types/jest",
|
|
211
|
-
"qualifiedName": "jest.It"
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
]
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"id": 9,
|
|
218
|
-
"name": "testIf",
|
|
219
|
-
"variant": "declaration",
|
|
220
|
-
"kind": 64,
|
|
221
|
-
"flags": {},
|
|
222
|
-
"sources": [
|
|
223
|
-
{
|
|
224
|
-
"fileName": "testIf.ts",
|
|
225
|
-
"line": 6,
|
|
226
|
-
"character": 13,
|
|
227
|
-
"url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/jest-helpers/src/testIf.ts#L6"
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
"signatures": [
|
|
231
|
-
{
|
|
232
|
-
"id": 10,
|
|
233
|
-
"name": "testIf",
|
|
234
|
-
"variant": "signature",
|
|
235
|
-
"kind": 4096,
|
|
236
|
-
"flags": {},
|
|
237
|
-
"comment": {
|
|
238
|
-
"summary": [
|
|
239
|
-
{
|
|
240
|
-
"kind": "text",
|
|
241
|
-
"text": "Conditionally runs or skips the test"
|
|
242
|
-
}
|
|
243
|
-
],
|
|
244
|
-
"blockTags": [
|
|
245
|
-
{
|
|
246
|
-
"tag": "@returns",
|
|
247
|
-
"content": [
|
|
248
|
-
{
|
|
249
|
-
"kind": "text",
|
|
250
|
-
"text": "If the condition is true, test, otherwise skips"
|
|
251
|
-
}
|
|
252
|
-
]
|
|
253
|
-
}
|
|
254
|
-
]
|
|
255
|
-
},
|
|
256
|
-
"sources": [
|
|
257
|
-
{
|
|
258
|
-
"fileName": "testIf.ts",
|
|
259
|
-
"line": 6,
|
|
260
|
-
"character": 22,
|
|
261
|
-
"url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/jest-helpers/src/testIf.ts#L6"
|
|
262
|
-
}
|
|
263
|
-
],
|
|
264
|
-
"typeParameter": [
|
|
265
|
-
{
|
|
266
|
-
"id": 11,
|
|
267
|
-
"name": "T",
|
|
268
|
-
"variant": "typeParam",
|
|
269
|
-
"kind": 131072,
|
|
270
|
-
"flags": {}
|
|
271
|
-
}
|
|
272
|
-
],
|
|
273
|
-
"parameters": [
|
|
274
|
-
{
|
|
275
|
-
"id": 12,
|
|
276
|
-
"name": "expr",
|
|
277
|
-
"variant": "param",
|
|
278
|
-
"kind": 32768,
|
|
279
|
-
"flags": {
|
|
280
|
-
"isOptional": true
|
|
281
|
-
},
|
|
282
|
-
"comment": {
|
|
283
|
-
"summary": [
|
|
284
|
-
{
|
|
285
|
-
"kind": "text",
|
|
286
|
-
"text": "The condition to evaluate"
|
|
287
|
-
}
|
|
288
|
-
]
|
|
289
|
-
},
|
|
290
|
-
"type": {
|
|
291
|
-
"type": "union",
|
|
292
|
-
"types": [
|
|
293
|
-
{
|
|
294
|
-
"type": "literal",
|
|
295
|
-
"value": null
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"type": "reference",
|
|
299
|
-
"target": -1,
|
|
300
|
-
"name": "T",
|
|
301
|
-
"refersToTypeParameter": true
|
|
302
|
-
}
|
|
303
|
-
]
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
],
|
|
307
|
-
"type": {
|
|
308
|
-
"type": "reference",
|
|
309
|
-
"target": {
|
|
310
|
-
"sourceFileName": "../../node_modules/@types/jest/index.d.ts",
|
|
311
|
-
"qualifiedName": "jest.It"
|
|
312
|
-
},
|
|
313
|
-
"name": "It",
|
|
314
|
-
"package": "@types/jest",
|
|
315
|
-
"qualifiedName": "jest.It"
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
]
|
|
319
|
-
}
|
|
320
|
-
],
|
|
321
|
-
"groups": [
|
|
322
|
-
{
|
|
323
|
-
"title": "Functions",
|
|
324
|
-
"children": [
|
|
325
|
-
1,
|
|
326
|
-
5,
|
|
327
|
-
9
|
|
328
|
-
]
|
|
329
|
-
}
|
|
330
|
-
],
|
|
331
|
-
"packageName": "@xylabs/jest-helpers",
|
|
332
|
-
"readme": [
|
|
333
|
-
{
|
|
334
|
-
"kind": "text",
|
|
335
|
-
"text": "[![logo][]](https://xylabs.com)\n\n# @xylabs/sdk-js\n\n[![main-build][]][main-build-link]\n[![beta-build][]][beta-build-link]\n[![npm-badge][]][npm-link]\n[![bch-badge][]][bch-link]\n[![codacy-badge][]][codacy-link]\n[![codeclimate-badge][]][codeclimate-link]\n[![snyk-badge][]][snyk-link]\n\n## Table of Contents\n\n- [Description](#description)\n- [Install](#install)\n- [Scripts](#scripts)\n- [Maintainers](#maintainers)\n- [License](#license)\n- [Credits](#credits)\n\n## Description\n\nSDK for base code for Typescript and Javascript Libraries.\n\n## Install\n\nUsing npm:\n\n"
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
"kind": "code",
|
|
339
|
-
"text": "```sh\nnpm i --save @xylabs/sdk-js\n```"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"kind": "text",
|
|
343
|
-
"text": "\n\nUsing yarn:\n\n"
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
"kind": "code",
|
|
347
|
-
"text": "```sh\nyarn add @xylabs/sdk-js\n```"
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"kind": "text",
|
|
351
|
-
"text": "\n\n## Scripts\n\nSee [ts-scripts](https://github.com/xylabs/ts-scripts/blob/main/README.md)\nfor list of shared scripts.\n\n## Maintainers\n\n- [Arie Trouw](https://github.com/arietrouw) (<https://arietrouw.com>)\n\n## License\n\nSee the [LICENSE](LICENSE) file for license details\n\n## Credits\n\n[Made with 🔥 and ❄️ by XY Labs](https://xylabs.com)\n\n[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg\n[main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build-main.yml/badge.svg\n[main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build-main.yml\n[beta-build]: https://github.com/xylabs/sdk-js/actions/workflows/build-beta.yml/badge.svg\n[beta-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build-beta.yml\n[npm-badge]: https://img.shields.io/npm/v/@xylabs/sdk-js.svg\n[npm-link]: https://www.npmjs.com/package/@xylabs/sdk-js\n[bch-badge]: https://bettercodehub.com/edge/badge/xylabs/sdk-js?branch=main\n[bch-link]: https://bettercodehub.com/results/xylabs/sdk-js\n[codacy-badge]: https://app.codacy.com/project/badge/Grade/c8e15e14f37741c18cfb47ac7245c698\n[codacy-link]: https://www.codacy.com/gh/xylabs/sdk-js/dashboard?utm_source=github.com&utm_medium=referral&utm_content=xylabs/sdk-js&utm_campaign=Badge_Grade\n[codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability\n[codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability\n[snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json\n[snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json"
|
|
352
|
-
}
|
|
353
|
-
],
|
|
354
|
-
"symbolIdMap": {
|
|
355
|
-
"0": {
|
|
356
|
-
"sourceFileName": "src/index.ts",
|
|
357
|
-
"qualifiedName": ""
|
|
358
|
-
},
|
|
359
|
-
"1": {
|
|
360
|
-
"sourceFileName": "src/describeIf.ts",
|
|
361
|
-
"qualifiedName": "describeIf"
|
|
362
|
-
},
|
|
363
|
-
"2": {
|
|
364
|
-
"sourceFileName": "src/describeIf.ts",
|
|
365
|
-
"qualifiedName": "describeIf"
|
|
366
|
-
},
|
|
367
|
-
"3": {
|
|
368
|
-
"sourceFileName": "src/describeIf.ts",
|
|
369
|
-
"qualifiedName": "T"
|
|
370
|
-
},
|
|
371
|
-
"4": {
|
|
372
|
-
"sourceFileName": "src/describeIf.ts",
|
|
373
|
-
"qualifiedName": "expr"
|
|
374
|
-
},
|
|
375
|
-
"5": {
|
|
376
|
-
"sourceFileName": "src/itIf.ts",
|
|
377
|
-
"qualifiedName": "itIf"
|
|
378
|
-
},
|
|
379
|
-
"6": {
|
|
380
|
-
"sourceFileName": "src/itIf.ts",
|
|
381
|
-
"qualifiedName": "itIf"
|
|
382
|
-
},
|
|
383
|
-
"7": {
|
|
384
|
-
"sourceFileName": "src/itIf.ts",
|
|
385
|
-
"qualifiedName": "T"
|
|
386
|
-
},
|
|
387
|
-
"8": {
|
|
388
|
-
"sourceFileName": "src/itIf.ts",
|
|
389
|
-
"qualifiedName": "expr"
|
|
390
|
-
},
|
|
391
|
-
"9": {
|
|
392
|
-
"sourceFileName": "src/testIf.ts",
|
|
393
|
-
"qualifiedName": "testIf"
|
|
394
|
-
},
|
|
395
|
-
"10": {
|
|
396
|
-
"sourceFileName": "src/testIf.ts",
|
|
397
|
-
"qualifiedName": "testIf"
|
|
398
|
-
},
|
|
399
|
-
"11": {
|
|
400
|
-
"sourceFileName": "src/testIf.ts",
|
|
401
|
-
"qualifiedName": "T"
|
|
402
|
-
},
|
|
403
|
-
"12": {
|
|
404
|
-
"sourceFileName": "src/testIf.ts",
|
|
405
|
-
"qualifiedName": "expr"
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
package/dist/esm/describeIf.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conditionally runs or skips the describe
|
|
3
|
-
* @param expr The condition to evaluate
|
|
4
|
-
* @returns If the condition is true, describe, otherwise skips
|
|
5
|
-
*/
|
|
6
|
-
export const describeIf = (expr) => (expr ? describe : describe.skip);
|
|
7
|
-
//# sourceMappingURL=describeIf.js.map
|