Skip to content

Merge pull request #345 from hustLer2k/crypto-web-apis #126

Merge pull request #345 from hustLer2k/crypto-web-apis

Merge pull request #345 from hustLer2k/crypto-web-apis #126

Triggered via push June 10, 2024 20:18
Status Failure
Total duration 1m 38s
Artifacts
Fit to window
Zoom out
Zoom in

Annotations

6 errors and 1 warning
src/createHmac.test.ts > should use HMAC-SHA256 algorithm with key, based on HMAC-SHA256 keyed with the "WebAppData" value, applied to the secret token: packages/init-data-node/src/createHmac.ts#L10
ReferenceError: crypto is not defined ❯ Module.createHmac src/createHmac.ts:10:3 ❯ src/createHmac.test.ts:7:23
src/sign.test.ts > should correctly sign data: packages/init-data-node/src/createHmac.ts#L10
ReferenceError: crypto is not defined ❯ Module.createHmac src/createHmac.ts:10:3 ❯ Module.signData src/signData.ts:12:51 ❯ Module.sign src/sign.ts:25:27 ❯ src/sign.test.ts:7:11
src/signData.test.ts > should use HMAC-SHA256 algorithm with key, based on HMAC-SHA256 keyed with the "WebAppData" value, applied to the secret token: packages/init-data-node/src/createHmac.ts#L10
ReferenceError: crypto is not defined ❯ Module.createHmac src/createHmac.ts:10:3 ❯ Module.signData src/signData.ts:12:51 ❯ src/signData.test.ts:6:16
src/validate.test.ts > should throw an error in case, sign is invalid: packages/init-data-node/src/validate.test.ts#L76
AssertionError: expected [Function] to throw error including 'Signature is invalid' but got 'crypto is not defined' - Expected + Received - Signature is invalid + crypto is not defined ❯ src/validate.test.ts:76:3
src/validate.test.ts > should correctly validate parameters in case, they are valid: packages/init-data-node/src/validate.test.ts#L85
AssertionError: promise rejected "ReferenceError: crypto is not defined" instead of resolving ❯ src/validate.test.ts:85:59 Caused by: ReferenceError: crypto is not defined ❯ Module.createHmac src/createHmac.ts:10:3 ❯ Module.signData src/signData.ts:12:51 ❯ Module.validate src/validate.ts:87:13 ❯ src/validate.test.ts:85:16
Run changeset
Process completed with exit code 1.
Run changeset
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, pnpm/action-setup@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.