Skip to content

Avoid use of Buffer as it does not exist in the Web natively #10435

Avoid use of Buffer as it does not exist in the Web natively

Avoid use of Buffer as it does not exist in the Web natively #10435

Triggered via pull request December 3, 2024 14:14
Status Failure
Total duration 2m 14s
Artifacts

tests.yml

on: pull_request
Matrix: Downstream test element-web / Jest
Waiting for pending jobs
Matrix: jest
Run Complement Crypto tests  /  tests
Run Complement Crypto tests / tests
Downstream test element-web  /  jest-tests
Downstream test element-web / jest-tests
Jest tests
2s
Jest tests
Downstream Complement Crypto tests
0s
Downstream Complement Crypto tests
Downstream tests
37s
Downstream tests
Fit to window
Zoom out
Zoom in

Annotations

26 errors
MatrixRTCSession › key management › receiving › collects keys from encryption events: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1347
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received @@ -1,7 +1,6 @@ - Object { - "data": Array [ + Uint8Array [ 116, 104, 105, 115, 32, @@ -13,8 +12,6 @@ 101, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 0, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1347:54)
MatrixRTCSession › key management › receiving › collects keys at non-zero indices: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1379
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received @@ -1,7 +1,6 @@ - Object { - "data": Array [ + Uint8Array [ 116, 104, 105, 115, 32, @@ -13,8 +12,6 @@ 101, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 4, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1379:54)
MatrixRTCSession › key management › receiving › collects keys by merging: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1411
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received @@ -1,7 +1,6 @@ - Object { - "data": Array [ + Uint8Array [ 116, 104, 105, 115, 32, @@ -13,8 +12,6 @@ 101, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 0, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1411:54)
MatrixRTCSession › key management › receiving › ignores older keys at same index: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1491
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received - Object { - "data": Array [ + Uint8Array [ 110, 101, 119, 101, 114, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 0, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1491:54)
MatrixRTCSession › key management › receiving › key timestamps are treated as monotonic: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1539
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received - Object { - "data": Array [ + Uint8Array [ 115, 101, 99, 111, 110, 100, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 0, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1539:54)
Base64 encoding (node) › Should decode properly encoded data: src/base64.ts#L55
TypeError: atob is not a function at atob (src/base64.ts:55:25) at itFunc.next (<anonymous>) at Function.from (<anonymous>) at from (src/base64.ts:63:23) at Object.<anonymous> (spec/unit/base64.spec.ts:47:62)
Base64 encoding (node) › Should encode unpadded URL-safe base64: src/base64.ts#L27
TypeError: btoa is not a function at btoa (src/base64.ts:27:12) at encodeBase64 (src/base64.ts:36:12) at encodeUnpaddedBase64 (src/base64.ts:45:12) at Object.<anonymous> (spec/unit/base64.spec.ts:57:48)
Base64 encoding (node) › Should decode URL-safe base64: src/base64.ts#L55
TypeError: atob is not a function at atob (src/base64.ts:55:25) at itFunc.next (<anonymous>) at Function.from (<anonymous>) at from (src/base64.ts:63:23) at Object.<anonymous> (spec/unit/base64.spec.ts:62:62)
Base64 encoding (node) › Encode unpadded should not have padding: src/base64.ts#L27
TypeError: btoa is not a function at btoa (src/base64.ts:27:12) at Object.<anonymous> (spec/unit/base64.spec.ts:71:43)
Base64 encoding (node) › Decode should be indifferent to padding: src/base64.ts#L55
TypeError: atob is not a function at atob (src/base64.ts:55:25) at itFunc.next (<anonymous>) at Function.from (<anonymous>) at from (src/base64.ts:63:23) at Object.<anonymous> (spec/unit/base64.spec.ts:84:40)
Jest [unit] (Node 22)
The job was canceled because "unit_lts__" failed.
MatrixRTCSession › key management › receiving › collects keys from encryption events: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1347
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received @@ -1,7 +1,6 @@ - Object { - "data": Array [ + Uint8Array [ 116, 104, 105, 115, 32, @@ -13,8 +12,6 @@ 101, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 0, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1347:54)
MatrixRTCSession › key management › receiving › collects keys at non-zero indices: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1379
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received @@ -1,7 +1,6 @@ - Object { - "data": Array [ + Uint8Array [ 116, 104, 105, 115, 32, @@ -13,8 +12,6 @@ 101, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 4, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1379:54)
MatrixRTCSession › key management › receiving › collects keys by merging: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1411
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received @@ -1,7 +1,6 @@ - Object { - "data": Array [ + Uint8Array [ 116, 104, 105, 115, 32, @@ -13,8 +12,6 @@ 101, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 0, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1411:54)
MatrixRTCSession › key management › receiving › ignores older keys at same index: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1491
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received - Object { - "data": Array [ + Uint8Array [ 110, 101, 119, 101, 114, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 0, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1491:54)
MatrixRTCSession › key management › receiving › key timestamps are treated as monotonic: spec/unit/matrixrtc/MatrixRTCSession.spec.ts#L1539
expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received - Object { - "data": Array [ + Uint8Array [ 115, 101, 99, 111, 110, 100, 32, 107, 101, 121, - ], - "type": "Buffer", - } + ], 0, "@bob:example.org:bobsphone", Number of calls: 1 at Object.toHaveBeenCalledWith (spec/unit/matrixrtc/MatrixRTCSession.spec.ts:1539:54)
Base64 encoding (node) › Should decode properly encoded data: src/base64.ts#L55
TypeError: atob is not a function at atob (src/base64.ts:55:25) at itFunc.next (<anonymous>) at Function.from (<anonymous>) at from (src/base64.ts:63:23) at Object.<anonymous> (spec/unit/base64.spec.ts:47:62)
Base64 encoding (node) › Should encode unpadded URL-safe base64: src/base64.ts#L27
TypeError: btoa is not a function at btoa (src/base64.ts:27:12) at encodeBase64 (src/base64.ts:36:12) at encodeUnpaddedBase64 (src/base64.ts:45:12) at Object.<anonymous> (spec/unit/base64.spec.ts:57:48)
Base64 encoding (node) › Should decode URL-safe base64: src/base64.ts#L55
TypeError: atob is not a function at atob (src/base64.ts:55:25) at itFunc.next (<anonymous>) at Function.from (<anonymous>) at from (src/base64.ts:63:23) at Object.<anonymous> (spec/unit/base64.spec.ts:62:62)
Base64 encoding (node) › Encode unpadded should not have padding: src/base64.ts#L27
TypeError: btoa is not a function at btoa (src/base64.ts:27:12) at Object.<anonymous> (spec/unit/base64.spec.ts:71:43)
Base64 encoding (node) › Decode should be indifferent to padding: src/base64.ts#L55
TypeError: atob is not a function at atob (src/base64.ts:55:25) at itFunc.next (<anonymous>) at Function.from (<anonymous>) at from (src/base64.ts:63:23) at Object.<anonymous> (spec/unit/base64.spec.ts:84:40)
Jest [integ] (Node lts/*)
The job was canceled because "unit_lts__" failed.
Jest [integ] (Node lts/*)
The operation was canceled.
Jest [integ] (Node 22)
The job was canceled because "unit_lts__" failed.
Jest [integ] (Node 22)
The operation was canceled.
Jest tests
Process completed with exit code 1.