File tree 2 files changed +5
-2
lines changed
bindings/matrix-sdk-crypto-js 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 26
26
" pkg/matrix_sdk_crypto.d.ts"
27
27
],
28
28
"devDependencies" : {
29
- "canvas" : " ^2.10.1" ,
30
29
"cross-env" : " ^7.0.3" ,
31
30
"fake-indexeddb" : " ^4.0" ,
32
31
"jest" : " ^28.1.0" ,
Original file line number Diff line number Diff line change @@ -749,7 +749,9 @@ describe('Key Verification', () => {
749
749
750
750
expect ( qrCode ) . toBeInstanceOf ( QrCode ) ;
751
751
752
- let canvasBuffer ;
752
+ // Want to get `canvasBuffer` to render the QR code? Install `npm install canvas` and uncomment the following blocks.
753
+
754
+ //let canvasBuffer;
753
755
754
756
{
755
757
const buffer = qrCode . renderIntoBuffer ( ) ;
@@ -760,6 +762,7 @@ describe('Key Verification', () => {
760
762
// 0 for a white pixel, 1 for a black pixel.
761
763
expect ( buffer . every ( p => p == 0 || p == 1 ) ) . toStrictEqual ( true ) ;
762
764
765
+ /*
763
766
const { Canvas } = require('canvas');
764
767
const canvas = new Canvas(55, 55);
765
768
@@ -792,6 +795,7 @@ describe('Key Verification', () => {
792
795
793
796
context.putImageData(imageData, 5, 5);
794
797
canvasBuffer = canvas.toBuffer('image/png');
798
+ */
795
799
}
796
800
797
801
// Want to see the QR code? Uncomment the following block.
You can’t perform that action at this time.
0 commit comments