Skip to content

Commit 25f8e03

Browse files
committed
replace jasmine expect().withContext() with Jest/vitest expect() 2nd argument
1 parent 4b63a1f commit 25f8e03

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/crypto/src/pbkdf2.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ describe("pbkdf2", () => {
115115
for (const [index, test] of brycxTests.entries()) {
116116
const { secret, salt, iterations, keylen, expected } = test;
117117
const hash = await pbkdf2Sha512(secret, salt, iterations, keylen);
118-
expect(hash).withContext(`brycx tests index ${index}`).toEqual(expected);
118+
expect(hash, `brycx tests index ${index}`).toEqual(expected);
119119
}
120120
});
121121
});
@@ -136,7 +136,7 @@ describe("pbkdf2", () => {
136136
for (const [index, test] of brycxTests.entries()) {
137137
const { secret, salt, iterations, keylen, expected } = test;
138138
const hash = await pbkdf2Sha512Subtle(subtle, secret, salt, iterations, keylen);
139-
expect(hash).withContext(`brycx tests index ${index}`).toEqual(expected);
139+
expect(hash, `brycx tests index ${index}`).toEqual(expected);
140140
}
141141
});
142142
});
@@ -152,7 +152,7 @@ describe("pbkdf2", () => {
152152
for (const [index, test] of brycxTests.entries()) {
153153
const { secret, salt, iterations, keylen, expected } = test;
154154
const hash = await pbkdf2Sha512Noble(secret, salt, iterations, keylen);
155-
expect(hash).withContext(`brycx tests index ${index}`).toEqual(expected);
155+
expect(hash, `brycx tests index ${index}`).toEqual(expected);
156156
}
157157
}, 120_000);
158158
});

packages/crypto/src/secp256k1.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ describe("Secp256k1", () => {
425425
messageHash,
426426
pubkey,
427427
);
428-
expect(isValid).withContext(`(index ${index})`).toEqual(true);
428+
expect(isValid, `(index ${index})`).toEqual(true);
429429
}
430430
});
431431

@@ -537,18 +537,18 @@ describe("Secp256k1", () => {
537537

538538
// verify calculated signature
539539
const ok1 = await Secp256k1.verifySignature(calculatedSignature, messageHash, keypair.pubkey);
540-
expect(ok1).withContext(`(index ${index})`).toEqual(true);
540+
expect(ok1, `(index ${index})`).toEqual(true);
541541

542542
// verify original signature
543543
const ok2 = await Secp256k1.verifySignature(
544544
Secp256k1Signature.fromDer(row.signature),
545545
messageHash,
546546
keypair.pubkey,
547547
);
548-
expect(ok2).withContext(`(index ${index})`).toEqual(true);
548+
expect(ok2, `(index ${index})`).toEqual(true);
549549

550550
// compare signatures
551-
expect(calculatedSignature.toDer()).withContext(`(index ${index})`).toEqual(row.signature);
551+
expect(calculatedSignature.toDer(), `(index ${index})`).toEqual(row.signature);
552552
}
553553
});
554554

packages/stargate/src/fee.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ describe("GasPrice", () => {
6363
};
6464
for (const [input, expected] of Object.entries(inputs)) {
6565
const gasPrice = GasPrice.fromString(input);
66-
expect(gasPrice.amount.toString()).withContext(`Input: ${input}`).toEqual(expected.amount);
67-
expect(gasPrice.denom).withContext(`Input: ${input}`).toEqual(expected.denom);
66+
expect(gasPrice.amount.toString(), `Input: ${input}`).toEqual(expected.amount);
67+
expect(gasPrice.denom, `Input: ${input}`).toEqual(expected.denom);
6868
}
6969
});
7070

0 commit comments

Comments
 (0)