@pezkuwi/dev-test 0.84.3 → 0.85.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.
Files changed (128) hide show
  1. package/.skip-deno +0 -0
  2. package/README.md +5 -5
  3. package/package.json +9 -199
  4. package/tsconfig.build.json +16 -0
  5. package/tsconfig.build.tsbuildinfo +1 -0
  6. package/tsconfig.spec.json +16 -0
  7. package/tsconfig.spec.tsbuildinfo +1 -0
  8. package/LICENSE +0 -201
  9. package/browser.d.ts +0 -1
  10. package/browser.js +0 -2
  11. package/cjs/browser.d.ts +0 -1
  12. package/cjs/browser.js +0 -4
  13. package/cjs/detectOther.d.ts +0 -2
  14. package/cjs/detectOther.js +0 -3
  15. package/cjs/env/browser.d.ts +0 -313
  16. package/cjs/env/browser.js +0 -98
  17. package/cjs/env/expect.d.ts +0 -297
  18. package/cjs/env/expect.js +0 -213
  19. package/cjs/env/index.d.ts +0 -4
  20. package/cjs/env/index.js +0 -20
  21. package/cjs/env/jest.d.ts +0 -127
  22. package/cjs/env/jest.js +0 -56
  23. package/cjs/env/lifecycle.d.ts +0 -12
  24. package/cjs/env/lifecycle.js +0 -17
  25. package/cjs/env/suite.d.ts +0 -16
  26. package/cjs/env/suite.js +0 -35
  27. package/cjs/index.d.ts +0 -1
  28. package/cjs/index.js +0 -1
  29. package/cjs/node.d.ts +0 -1
  30. package/cjs/node.js +0 -4
  31. package/cjs/package.json +0 -3
  32. package/cjs/packageInfo.d.ts +0 -6
  33. package/cjs/packageInfo.js +0 -4
  34. package/cjs/root.d.ts +0 -2
  35. package/cjs/root.js +0 -6
  36. package/cjs/rootJs/Clazz.d.ts +0 -18
  37. package/cjs/rootJs/Clazz.js +0 -36
  38. package/cjs/rootJs/Jsx.d.ts +0 -5
  39. package/cjs/rootJs/Jsx.js +0 -16
  40. package/cjs/rootJs/JsxChild.d.ts +0 -9
  41. package/cjs/rootJs/JsxChild.js +0 -9
  42. package/cjs/rootJs/augmented.d.ts +0 -8
  43. package/cjs/rootJs/augmented.js +0 -3
  44. package/cjs/rootJs/index.d.ts +0 -19
  45. package/cjs/rootJs/index.js +0 -51
  46. package/cjs/rootTests.d.ts +0 -2
  47. package/cjs/rootTests.js +0 -44
  48. package/cjs/sample.d.ts +0 -1
  49. package/cjs/sample.js +0 -4
  50. package/cjs/types.d.ts +0 -15
  51. package/cjs/types.js +0 -2
  52. package/cjs/util.d.ts +0 -20
  53. package/cjs/util.js +0 -51
  54. package/config/eslint.js +0 -160
  55. package/config/eslint.rules.js +0 -214
  56. package/config/prettier.cjs +0 -22
  57. package/config/rollup.js +0 -113
  58. package/config/tsconfig.json +0 -32
  59. package/config/typedoc.cjs +0 -18
  60. package/detectOther.d.ts +0 -2
  61. package/detectOther.js +0 -1
  62. package/env/browser.d.ts +0 -313
  63. package/env/browser.js +0 -95
  64. package/env/expect.d.ts +0 -297
  65. package/env/expect.js +0 -210
  66. package/env/index.d.ts +0 -4
  67. package/env/index.js +0 -17
  68. package/env/jest.d.ts +0 -127
  69. package/env/jest.js +0 -53
  70. package/env/lifecycle.d.ts +0 -12
  71. package/env/lifecycle.js +0 -14
  72. package/env/suite.d.ts +0 -16
  73. package/env/suite.js +0 -32
  74. package/globals.cjs +0 -4
  75. package/globals.d.cts +0 -1
  76. package/globals.d.ts +0 -32
  77. package/index.d.ts +0 -1
  78. package/index.js +0 -1
  79. package/node.d.ts +0 -1
  80. package/node.js +0 -2
  81. package/packageInfo.d.ts +0 -6
  82. package/packageInfo.js +0 -1
  83. package/root.d.ts +0 -2
  84. package/root.js +0 -2
  85. package/rootJs/Clazz.d.ts +0 -18
  86. package/rootJs/Clazz.js +0 -32
  87. package/rootJs/Jsx.d.ts +0 -5
  88. package/rootJs/Jsx.js +0 -13
  89. package/rootJs/JsxChild.d.ts +0 -9
  90. package/rootJs/JsxChild.js +0 -6
  91. package/rootJs/augmented.d.ts +0 -8
  92. package/rootJs/augmented.js +0 -2
  93. package/rootJs/dynamic.d.mts +0 -8
  94. package/rootJs/dynamic.mjs +0 -13
  95. package/rootJs/index.d.ts +0 -19
  96. package/rootJs/index.js +0 -39
  97. package/rootJs/testJson.json +0 -5
  98. package/rootStatic/kusama.svg +0 -1
  99. package/rootTests.d.ts +0 -2
  100. package/rootTests.js +0 -41
  101. package/scripts/polkadot-ci-ghact-build.mjs +0 -536
  102. package/scripts/polkadot-ci-ghact-docs.mjs +0 -14
  103. package/scripts/polkadot-ci-ghpages-force.mjs +0 -43
  104. package/scripts/polkadot-dev-build-docs.mjs +0 -19
  105. package/scripts/polkadot-dev-build-ts.mjs +0 -1518
  106. package/scripts/polkadot-dev-circular.mjs +0 -29
  107. package/scripts/polkadot-dev-clean-build.mjs +0 -61
  108. package/scripts/polkadot-dev-contrib.mjs +0 -74
  109. package/scripts/polkadot-dev-copy-dir.mjs +0 -44
  110. package/scripts/polkadot-dev-copy-to.mjs +0 -53
  111. package/scripts/polkadot-dev-deno-map.mjs +0 -35
  112. package/scripts/polkadot-dev-run-lint.mjs +0 -40
  113. package/scripts/polkadot-dev-run-node-ts.mjs +0 -9
  114. package/scripts/polkadot-dev-run-test.mjs +0 -163
  115. package/scripts/polkadot-dev-version.mjs +0 -143
  116. package/scripts/polkadot-dev-yarn-only.mjs +0 -11
  117. package/scripts/polkadot-exec-eslint.mjs +0 -7
  118. package/scripts/polkadot-exec-ghpages.mjs +0 -11
  119. package/scripts/polkadot-exec-ghrelease.mjs +0 -7
  120. package/scripts/polkadot-exec-node-test.mjs +0 -368
  121. package/scripts/polkadot-exec-rollup.mjs +0 -7
  122. package/scripts/polkadot-exec-tsc.mjs +0 -7
  123. package/scripts/polkadot-exec-webpack.mjs +0 -7
  124. package/scripts/util.mjs +0 -540
  125. package/types.d.ts +0 -15
  126. package/types.js +0 -1
  127. package/util.d.ts +0 -20
  128. package/util.js +0 -46
package/env/jest.js DELETED
@@ -1,53 +0,0 @@
1
- import { mock } from 'node:test';
2
- import { enhanceObj, stubObj, warnObj } from '../util.js';
3
- const JEST_KEYS_STUB = ['advanceTimersByTime', 'advanceTimersToNextTimer', 'autoMockOff', 'autoMockOn', 'clearAllMocks', 'clearAllTimers', 'createMockFromModule', 'deepUnmock', 'disableAutomock', 'doMock', 'dontMock', 'enableAutomock', 'fn', 'genMockFromModule', 'getRealSystemTime', 'getSeed', 'getTimerCount', 'isEnvironmentTornDown', 'isMockFunction', 'isolateModules', 'isolateModulesAsync', 'mock', 'mocked', 'now', 'replaceProperty', 'requireActual', 'requireMock', 'resetAllMocks', 'resetModules', 'restoreAllMocks', 'retryTimes', 'runAllImmediates', 'runAllTicks', 'runAllTimers', 'runOnlyPendingTimers', 'setMock', 'setSystemTime', 'setTimeout', 'spyOn', 'unmock', 'unstable_mockModule', 'useFakeTimers', 'useRealTimers'];
4
- const JEST_KEYS_WARN = ['setTimeout'];
5
- const MOCK_KEYS_STUB = ['_isMockFunction', 'getMockImplementation', 'getMockName', 'mock', 'mockClear', 'mockImplementation', 'mockImplementationOnce', 'mockName', 'mockRejectedValue', 'mockRejectedValueOnce', 'mockReset', 'mockResolvedValue', 'mockResolvedValueOnce', 'mockRestore', 'mockReturnThis', 'mockReturnValue', 'mockReturnValueOnce', 'withImplementation'];
6
- const jestStub = stubObj('jest', JEST_KEYS_STUB);
7
- const jestWarn = warnObj('jest', JEST_KEYS_WARN);
8
- const mockStub = stubObj('jest.fn()', MOCK_KEYS_STUB);
9
- /**
10
- * @internal
11
- *
12
- * This adds the mockReset and mockRestore functionality to any
13
- * spy or mock function
14
- **/
15
- function extendMock(mocked) {
16
- // We use the node:test mock here for casting below - however we
17
- // don't want this in any method signature since this is a private
18
- // types export, which could get us in "some" trouble
19
- //
20
- // Effectively the casts below ensure that our WithMock<*> aligns
21
- // on a high-level to what we use via private type...
22
- const spy = mocked;
23
- return enhanceObj(enhanceObj(mocked, {
24
- mockImplementation: (fn) => {
25
- spy.mock.mockImplementation(fn);
26
- },
27
- mockImplementationOnce: (fn) => {
28
- spy.mock.mockImplementationOnce(fn);
29
- },
30
- mockReset: () => {
31
- spy.mock.resetCalls();
32
- },
33
- mockRestore: () => {
34
- spy.mock.restore();
35
- }
36
- }), mockStub);
37
- }
38
- /**
39
- * Sets up the jest object. This is certainly not extensive, and probably
40
- * not quite meant to be (never say never). Rather this adds the functionality
41
- * that we use in the polkadot-js projects.
42
- **/
43
- export function jest() {
44
- return {
45
- jest: enhanceObj(enhanceObj({
46
- fn: (fn) => extendMock(mock.fn(fn)),
47
- restoreAllMocks: () => {
48
- mock.reset();
49
- },
50
- spyOn: (obj, key) => extendMock(mock.method(obj, key))
51
- }, jestWarn), jestStub)
52
- };
53
- }
@@ -1,12 +0,0 @@
1
- import { after, afterEach, before, beforeEach } from 'node:test';
2
- /**
3
- * This ensures that the before/after functions are exposed
4
- **/
5
- export declare function lifecycle(): {
6
- after: typeof after;
7
- afterAll: typeof after;
8
- afterEach: typeof afterEach;
9
- before: typeof before;
10
- beforeAll: typeof before;
11
- beforeEach: typeof beforeEach;
12
- };
package/env/lifecycle.js DELETED
@@ -1,14 +0,0 @@
1
- import { after, afterEach, before, beforeEach } from 'node:test';
2
- /**
3
- * This ensures that the before/after functions are exposed
4
- **/
5
- export function lifecycle() {
6
- return {
7
- after,
8
- afterAll: after,
9
- afterEach,
10
- before,
11
- beforeAll: before,
12
- beforeEach
13
- };
14
- }
package/env/suite.d.ts DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * This ensures that the describe and it functions match our actual usages.
3
- * This includes .only, .skip and .todo helpers (.each is not applied)
4
- **/
5
- export declare function suite(): {
6
- describe: ((name: string, exec: () => void | Promise<void>, timeout?: number) => void) & Omit<{
7
- only: (name: string, exec: () => void | Promise<void>, timeout?: number) => void;
8
- skip: (name: string, exec: () => void | Promise<void>, timeout?: number) => void;
9
- todo: (name: string, exec: () => void | Promise<void>, timeout?: number) => void;
10
- }, never>;
11
- it: ((name: string, exec: () => void | Promise<void>, timeout?: number) => void) & Omit<{
12
- only: (name: string, exec: () => void | Promise<void>, timeout?: number) => void;
13
- skip: (name: string, exec: () => void | Promise<void>, timeout?: number) => void;
14
- todo: (name: string, exec: () => void | Promise<void>, timeout?: number) => void;
15
- }, never>;
16
- };
package/env/suite.js DELETED
@@ -1,32 +0,0 @@
1
- import { describe, it } from 'node:test';
2
- import { enhanceObj } from '../util.js';
3
- const MINUTE = 60 * 1000;
4
- /**
5
- * @internal
6
- *
7
- * Wraps either describe or it with relevant .only, .skip, .todo & .each helpers,
8
- * shimming it into a Jest-compatible environment.
9
- *
10
- * @param {} fn
11
- */
12
- function createWrapper(fn, defaultTimeout) {
13
- const wrap = (opts) => (name, exec, timeout) => fn(name, { ...opts, timeout: (timeout || defaultTimeout) }, exec);
14
- // Ensure that we have consistent helpers on the function. These are not consistently
15
- // applied accross all node:test versions, latest has all, so always apply ours.
16
- // Instead of node:test options for e.g. timeout, we provide a Jest-compatible signature
17
- return enhanceObj(wrap({}), {
18
- only: wrap({ only: true }),
19
- skip: wrap({ skip: true }),
20
- todo: wrap({ todo: true })
21
- });
22
- }
23
- /**
24
- * This ensures that the describe and it functions match our actual usages.
25
- * This includes .only, .skip and .todo helpers (.each is not applied)
26
- **/
27
- export function suite() {
28
- return {
29
- describe: createWrapper(describe, 60 * MINUTE),
30
- it: createWrapper(it, 2 * MINUTE)
31
- };
32
- }
package/globals.cjs DELETED
@@ -1,4 +0,0 @@
1
- // Copyright 2017-2025 @polkadot/dev-test authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- module.exports = {};
package/globals.d.cts DELETED
@@ -1 +0,0 @@
1
- export {};
package/globals.d.ts DELETED
@@ -1,32 +0,0 @@
1
- // Copyright 2017-2025 @polkadot/dev-test authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- /* eslint-disable no-var */
5
-
6
- import type { expect } from './env/expect.js';
7
- import type { jest } from './env/jest.js';
8
- import type { lifecycle } from './env/lifecycle.js';
9
- import type { suite } from './env/suite.js';
10
-
11
- type Expect = ReturnType<typeof expect>;
12
-
13
- type Jest = ReturnType<typeof jest>;
14
-
15
- type Lifecycle = ReturnType<typeof lifecycle>;
16
-
17
- type Suite = ReturnType<typeof suite>;
18
-
19
- declare global {
20
- var after: Lifecycle['after'];
21
- var afterAll: Lifecycle['afterAll'];
22
- var afterEach: Lifecycle['afterEach'];
23
- var before: Lifecycle['before'];
24
- var beforeAll: Lifecycle['beforeAll'];
25
- var beforeEach: Lifecycle['beforeEach'];
26
- var describe: Suite['describe'];
27
- var expect: Expect['expect'];
28
- var it: Suite['it'];
29
- var jest: Jest['jest'];
30
- }
31
-
32
- export {};
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/index.js DELETED
@@ -1 +0,0 @@
1
- throw new Error('Use node --require @pezkuwi/dev-test/{node, browser} depending on the required environment');
package/node.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/node.js DELETED
@@ -1,2 +0,0 @@
1
- import { exposeEnv } from './env/index.js';
2
- exposeEnv(false);
package/packageInfo.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export declare const packageInfo: {
2
- name: string;
3
- path: string;
4
- type: string;
5
- version: string;
6
- };
package/packageInfo.js DELETED
@@ -1 +0,0 @@
1
- export const packageInfo = { name: '@pezkuwi/dev-test', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.83.3' };
package/root.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './rootJs/index.js';
2
- export declare const TEST_PURE = "testRoot";
package/root.js DELETED
@@ -1,2 +0,0 @@
1
- export * from './rootJs/index.js';
2
- export const TEST_PURE = /*#__PURE__*/ 'testRoot';
package/rootJs/Clazz.d.ts DELETED
@@ -1,18 +0,0 @@
1
- export declare class Clazz {
2
- #private;
3
- readonly and: number;
4
- static staticProperty: string;
5
- static staticFunction: () => string | null;
6
- /**
7
- * @param and the number we should and with
8
- */
9
- constructor(and: number);
10
- get something(): number;
11
- doAsync(): Promise<boolean>;
12
- /**
13
- * @description Sets something to something
14
- * @param something The addition
15
- */
16
- setSomething: (something?: number) => number;
17
- toString(): string;
18
- }
package/rootJs/Clazz.js DELETED
@@ -1,32 +0,0 @@
1
- export class Clazz {
2
- #something = 123_456_789;
3
- and;
4
- static staticProperty = 'foobar';
5
- static staticFunction = () => Clazz.staticProperty;
6
- /**
7
- * @param and the number we should and with
8
- */
9
- constructor(and) {
10
- this.and = and;
11
- this.#something = this.#something & and;
12
- }
13
- get something() {
14
- return this.#something;
15
- }
16
- async doAsync() {
17
- const res = await new Promise((resolve) => resolve(true));
18
- console.log(res);
19
- return res;
20
- }
21
- /**
22
- * @description Sets something to something
23
- * @param something The addition
24
- */
25
- setSomething = (something) => {
26
- this.#something = (something ?? 123_456) & this.and;
27
- return this.#something;
28
- };
29
- toString() {
30
- return `something=${this.#something}`;
31
- }
32
- }
package/rootJs/Jsx.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import type { Props } from './JsxChild.js';
2
- import React from 'react';
3
- declare function Hidden({ children, className }: Props): React.ReactElement<Props>;
4
- declare const _default: React.MemoExoticComponent<typeof Hidden>;
5
- export default _default;
package/rootJs/Jsx.js DELETED
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useCallback, useState } from 'react';
3
- import { styled } from 'styled-components';
4
- import Child from './JsxChild.js';
5
- function Hidden({ children, className }) {
6
- const [isMessageVisible, setMessageVisibility] = useState(false);
7
- const onShow = useCallback((e) => setMessageVisibility(e.target.checked), []);
8
- return (_jsxs(StyledDiv, { className: className, children: [_jsx("label", { htmlFor: 'toggle', children: "Show Message" }), _jsx("input", { checked: isMessageVisible, id: 'toggle', onChange: onShow, type: 'checkbox' }), isMessageVisible && (_jsxs(_Fragment, { children: [children, _jsx(Child, { label: 'hello' })] }))] }));
9
- }
10
- const StyledDiv = styled.div `
11
- background: red;
12
- `;
13
- export default React.memo(Hidden);
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- export interface Props {
3
- children?: React.ReactNode;
4
- className?: string;
5
- label?: string;
6
- }
7
- declare function Child({ children, className, label }: Props): React.ReactElement<Props>;
8
- declare const _default: React.MemoExoticComponent<typeof Child>;
9
- export default _default;
@@ -1,6 +0,0 @@
1
- import { jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- function Child({ children, className, label }) {
4
- return (_jsxs("div", { className: className, children: [label || '', children] }));
5
- }
6
- export default React.memo(Child);
@@ -1,8 +0,0 @@
1
- /** This tests augmentation outputs, e.g. as used in the polkadot-js/api */
2
- export interface Something {
3
- bar: string;
4
- foo: string;
5
- }
6
- declare module '@polkadot/dev/types' {
7
- const blah: string;
8
- }
@@ -1,2 +0,0 @@
1
- /* eslint-disable */
2
- export {};
@@ -1,8 +0,0 @@
1
- /**
2
- * Returns the sum of 2 numbers
3
- *
4
- * @param {number} a
5
- * @param {number} b
6
- * @returns {number}
7
- */
8
- export function sum(a: number, b: number): number;
@@ -1,13 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/dev authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- /**
5
- * Returns the sum of 2 numbers
6
- *
7
- * @param {number} a
8
- * @param {number} b
9
- * @returns {number}
10
- */
11
- export function sum (a, b) {
12
- return a + b;
13
- }
package/rootJs/index.d.ts DELETED
@@ -1,19 +0,0 @@
1
- /** This should appear as-is in the output with: 1. extension added, 2. augmented.d.ts correct */
2
- import './augmented.js';
3
- /** Double double work, i.e. re-exports */
4
- export { Clazz } from './Clazz.js';
5
- /** Function to ensure that BigInt does not have the Babel Math.pow() transform */
6
- export declare function bigIntExp(): bigint;
7
- /** Function to ensure that dynamic imports work */
8
- export declare function dynamic(a: number, b: number): Promise<number>;
9
- /** Function to ensure we have json correctly imported */
10
- export declare function json(): string;
11
- /** Check support for the ?? operator */
12
- export declare function jsOpExp(a?: number): number;
13
- /** This is an actual check to ensure PURE is all-happy */
14
- export declare const pureOpExp: number;
15
- declare const fooA = 1;
16
- declare const fooB = 2;
17
- declare const fooC = 3;
18
- declare const fooD = 4;
19
- export { fooA, fooB, fooC, fooD };
package/rootJs/index.js DELETED
@@ -1,39 +0,0 @@
1
- /** This should appear as-is in the output with: 1. extension added, 2. augmented.d.ts correct */
2
- import './augmented.js';
3
- /** This import should appear as-in in the ouput (cjs without asserts) */
4
- import testJson from '@pezkuwi/dev/rootJs/testJson.json' assert { type: 'json' };
5
- /** Double double work, i.e. re-exports */
6
- export { Clazz } from './Clazz.js';
7
- /** Function to ensure that BigInt does not have the Babel Math.pow() transform */
8
- export function bigIntExp() {
9
- // 123_456n * 137_858_491_849n
10
- return 123456789n * (13n ** 10n);
11
- }
12
- /** Function to ensure that dynamic imports work */
13
- export async function dynamic(a, b) {
14
- // NOTE we go via this path so it points to the same location in both ESM
15
- // and CJS output (a './dynamic' import would be different otherwise)
16
- const { sum } = await import('@pezkuwi/dev/rootJs/dynamic.mjs');
17
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18
- return sum(a, b);
19
- }
20
- /** Function to ensure we have json correctly imported */
21
- export function json() {
22
- return testJson.test.json;
23
- }
24
- /** Check support for the ?? operator */
25
- export function jsOpExp(a) {
26
- const defaults = {
27
- a: 42,
28
- b: 43,
29
- c: 44
30
- };
31
- return a ?? defaults.a;
32
- }
33
- /** This is an actual check to ensure PURE is all-happy */
34
- export const pureOpExp = /*#__PURE__*/ jsOpExp();
35
- const fooA = 1;
36
- const fooB = 2;
37
- const fooC = 3;
38
- const fooD = 4;
39
- export { fooA, fooB, fooC, fooD };
@@ -1,5 +0,0 @@
1
- {
2
- "test": {
3
- "json": "works"
4
- }
5
- }
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 441 441"><defs><style>.cls-1{stroke:#000;stroke-miterlimit:10;}.cls-2{fill:#fff;}</style></defs><title>kusama-ksm-logo</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect class="cls-1" x="0.5" y="0.5" width="440" height="440"/><path class="cls-2" d="M373.6,127.4c-5.2-4.1-11.4-9.7-22.7-11.1-10.6-1.4-21.4,5.7-28.7,10.4s-21.1,18.5-26.8,22.7-20.3,8.1-43.8,22.2-115.7,73.3-115.7,73.3l24,.3-107,55.1H63.6L48.2,312s13.6,3.6,25-3.6v3.3s127.4-50.2,152-37.2l-15,4.4c1.3,0,25.5,1.6,25.5,1.6a34.34,34.34,0,0,0,15.4,24.8c14.6,9.6,14.9,14.9,14.9,14.9s-7.6,3.1-7.6,7c0,0,11.2-3.4,21.6-3.1a82.64,82.64,0,0,1,19.5,3.1s-.8-4.2-10.9-7-20.1-13.8-25-19.8a28,28,0,0,1-4.1-27.4c3.5-9.1,15.7-14.1,40.9-27.1,29.7-15.4,36.5-26.8,40.7-35.7s10.4-26.6,13.9-34.9c4.4-10.7,9.8-16.4,14.3-19.8s24.5-10.9,24.5-10.9S378.5,131.3,373.6,127.4Z"/></g></g></svg>
package/rootTests.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import type * as testRoot from './root.js';
2
- export declare function runTests({ Clazz, TEST_PURE, bigIntExp, dynamic, jsOpExp, json }: typeof testRoot): void;
package/rootTests.js DELETED
@@ -1,41 +0,0 @@
1
- export function runTests({ Clazz, TEST_PURE, bigIntExp, dynamic, jsOpExp, json }) {
2
- describe('Clazz', () => {
3
- it('has staticProperty', () => {
4
- expect(Clazz.staticProperty).toBe('foobar');
5
- });
6
- it('creates an instance with get/set', () => {
7
- const c = new Clazz(456);
8
- expect(c.something).toBe(123_456_789 & 456);
9
- c.setSomething(123);
10
- expect(c.something).toBe(123 & 456);
11
- });
12
- });
13
- describe('TEST_PURE', () => {
14
- it('should have the correct value', () => {
15
- expect(TEST_PURE).toBe('testRoot');
16
- });
17
- });
18
- describe('dynamic()', () => {
19
- it('should allow dynamic import usage', async () => {
20
- expect(await dynamic(5, 37)).toBe(42);
21
- });
22
- });
23
- describe('bigIntExp()', () => {
24
- it('should return the correct value', () => {
25
- expect(bigIntExp()).toBe(123456789n * 137858491849n);
26
- });
27
- });
28
- describe('jsOpExp', () => {
29
- it('handles 0 ?? 42 correctly', () => {
30
- expect(jsOpExp(0)).toBe(0);
31
- });
32
- it('handles undefined ?? 42 correctly', () => {
33
- expect(jsOpExp()).toBe(42);
34
- });
35
- });
36
- describe('json()', () => {
37
- it('should return the correct value', () => {
38
- expect(json()).toBe('works');
39
- });
40
- });
41
- }