Skip to content

Commit

Permalink
remove single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-abrioux committed Nov 14, 2023
1 parent ad6a1c2 commit cc437e7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/utils/test/crypto/ec-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Utils/EcUtils', () => {
expect(identity).toBe(rawId.address);
});
it('cannot get Address From PrivateKey if the private key is wrong', () => {
// 'getAddressFromPrivateKey() error'
// getAddressFromPrivateKey() error
expect(() => getAddressFromPrivateKey('aa')).toThrowError(
'The private key must be a string representing 32 bytes',
);
Expand All @@ -50,7 +50,7 @@ describe('Utils/EcUtils', () => {
expect(identity).toBe(rawId.address);
});
it('cannot get Address From Public Key if the Public key is wrong', () => {
// 'getAddressFromPrivateKey() error'
// getAddressFromPrivateKey() error
expect(() => getAddressFromPublicKey('aa')).toThrowError(
'The public key must be a string representing 64 bytes',
);
Expand All @@ -68,7 +68,7 @@ describe('Utils/EcUtils', () => {
);
});
it('cannot signs if the private key is wrong', () => {
// 'sign() error'
// sign() error
expect(() =>
ecSign('aa', '0xfd6201dabdd4d7177f7c3baba47c5533b12f0a8127ab5d8c71d831fa4df2b19f'),
).toThrowError('The private key must be a string representing 32 bytes');
Expand All @@ -84,7 +84,7 @@ describe('Utils/EcUtils', () => {
expect(id).toEqual(rawId.address);
});
it('cannot recover address from signature if signature is not well formatted', () => {
// 'sign() error'
// sign() error
expect(() =>
ecRecover('0xaa', '0xfd6201dabdd4d7177f7c3baba47c5533b12f0a8127ab5d8c71d831fa4df2b19f'),
).toThrowError('The signature must be a string representing 66 bytes');
Expand All @@ -107,7 +107,7 @@ describe('Utils/EcUtils', () => {
});

it('cannot encrypt data with a wrong public key', async () => {
// 'encrypt() error'
// encrypt() error
await expect(ecEncrypt('cf4a', anyData)).rejects.toThrowError(
'The public key must be a string representing 64 bytes',
);
Expand All @@ -124,7 +124,7 @@ describe('Utils/EcUtils', () => {
});

it('cannot decrypt data with a wrong private key', async () => {
// 'decrypt() error'
// decrypt() error
await expect(
ecDecrypt(
'0xaa',
Expand All @@ -134,14 +134,14 @@ describe('Utils/EcUtils', () => {
});

it('cannot decrypt data with a wrong encrypted data: public key too short', async () => {
// 'decrypt() error'
// decrypt() error
await expect(ecDecrypt(rawId.privateKey, 'aa')).rejects.toThrowError(
'The encrypted data is not well formatted',
);
});

it('cannot decrypt data with a wrong encrypted data: public key not parsable', async () => {
// 'decrypt() error'
// decrypt() error
await expect(
ecDecrypt(
rawId.privateKey,
Expand All @@ -151,7 +151,7 @@ describe('Utils/EcUtils', () => {
});

it('cannot decrypt data with a wrong encrypted data: bad MAC', async () => {
// 'decrypt() error'
// decrypt() error
await expect(
ecDecrypt(
rawId.privateKey,
Expand Down

0 comments on commit cc437e7

Please sign in to comment.