Skip to content

Commit e7d687d

Browse files
build(deps-dev): bump jest and @types/jest (#3142)
* build(deps-dev): bump jest and @types/jest Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together. Updates `jest` from 29.7.0 to 30.2.0 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.2.0/packages/jest) Updates `@types/jest` from 29.5.14 to 30.0.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: jest dependency-version: 30.2.0 dependency-type: direct:development update-type: version-update:semver-major - dependency-name: "@types/jest" dependency-version: 30.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix tests * fix unit tests * remove unnecessary comment * fix more unit tests * fix browser test * more linter fix --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Phu Pham <ppham@ripple.com>
1 parent f465d89 commit e7d687d

File tree

8 files changed

+1796
-1034
lines changed

8 files changed

+1796
-1034
lines changed

package-lock.json

Lines changed: 1769 additions & 1007 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@xrplf/eslint-config": "^3.0.0",
3030
"@xrplf/prettier-config": "^1.9.1",
3131
"@types/chai": "^4.2.21",
32-
"@types/jest": "^29.2.2",
32+
"@types/jest": "^30.0.0",
3333
"@types/lodash": "^4.14.136",
3434
"@types/node": "^18.19.29",
3535
"typescript-eslint": "^8.52.0",
@@ -46,7 +46,7 @@
4646
"eslint-plugin-prettier": "^5.5.4",
4747
"eslint-plugin-tsdoc": "^0.5.0",
4848
"expect": "^30.2.0",
49-
"jest": "^29.3.1",
49+
"jest": "^30.2.0",
5050
"jest-mock": "^30.2.0",
5151
"lerna": "^9.0.4",
5252
"lodash": "^4.17.21",

packages/isomorphic/test/utils.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ describe('utils', function () {
1212
})
1313

1414
it('hexToBytes - empty', () => {
15-
expect(hexToBytes('')).toEqual(new Uint8Array([]))
15+
expect(Array.from(hexToBytes(''))).toEqual([])
1616
})
1717

1818
it('hexToBytes - zero', () => {
19-
expect(hexToBytes('000000')).toEqual(new Uint8Array([0, 0, 0]))
19+
expect(Array.from(hexToBytes('000000'))).toEqual([0, 0, 0])
2020
})
2121

2222
it('hexToBytes - DEADBEEF', () => {
23-
expect(hexToBytes('DEADBEEF')).toEqual(new Uint8Array([222, 173, 190, 239]))
23+
expect(Array.from(hexToBytes('DEADBEEF'))).toEqual([222, 173, 190, 239])
2424
})
2525

2626
it('hexToBytes - DEADBEEF', () => {
27-
expect(hexToBytes('DEADBEEF')).toEqual(new Uint8Array([222, 173, 190, 239]))
27+
expect(Array.from(hexToBytes('DEADBEEF'))).toEqual([222, 173, 190, 239])
2828
})
2929

3030
it('bytesToHex - DEADBEEF', () => {

packages/ripple-address-codec/test/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ it(`Invalid X-address (64-bit tag) throws`, () => {
259259
it(`Invalid Account ID throws`, () => {
260260
expect(() => {
261261
encodeXAddress(hexToBytes('00'.repeat(19)), false, false)
262-
}).toThrowError('Account ID must be 20 bytes')
262+
}).toThrow(new Error('Account ID must be 20 bytes'))
263263
})
264264

265265
it(`isValidXAddress returns false for invalid X-address`, () => {

packages/ripple-address-codec/test/xrp-codec.test.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -268,26 +268,30 @@ it('empty payload should throw', () => {
268268
})
269269

270270
it('decode data', () => {
271-
expect(
272-
codec.decode('rnaC7gW34M77Kneb78s', {
273-
versions: [0],
274-
}),
275-
).toEqual({
271+
const result = codec.decode('rnaC7gW34M77Kneb78s', {
272+
versions: [0],
273+
})
274+
expect({
275+
...result,
276+
bytes: Array.from(result.bytes),
277+
}).toEqual({
276278
version: [0],
277-
bytes: stringToBytes('123456789'),
279+
bytes: Array.from(stringToBytes('123456789')),
278280
type: null,
279281
})
280282
})
281283

282284
it('decode data with expected length', function () {
283-
expect(
284-
codec.decode('rnaC7gW34M77Kneb78s', {
285-
versions: [0],
286-
expectedLength: 9,
287-
}),
288-
).toEqual({
285+
const result = codec.decode('rnaC7gW34M77Kneb78s', {
286+
versions: [0],
287+
expectedLength: 9,
288+
})
289+
expect({
290+
...result,
291+
bytes: Array.from(result.bytes),
292+
}).toEqual({
289293
version: [0],
290-
bytes: stringToBytes('123456789'),
294+
bytes: Array.from(stringToBytes('123456789')),
291295
type: null,
292296
})
293297
})

packages/ripple-binary-codec/test/uint.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ it('compareToTest[7]', () => {
163163
})
164164

165165
it('UInt64 from string zero', () => {
166-
expect(UInt64.from('0')).toEqual(UInt64.from(0))
166+
expect(UInt64.from('0').toJSON()).toEqual(UInt64.from(0).toJSON())
167167
expect(encode(json)).toEqual(binary)
168168
})
169169

packages/secret-numbers/test/api.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ describe('API: XRPL Secret Numbers', () => {
8686
expect(() => {
8787
// eslint-disable-next-line no-new -- Don't want unused variable
8888
new Account(secret)
89-
})
90-
// TODO: Remove if jest is removed.
91-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- Jest and Jasmine have two different signatures.
92-
// @ts-expect-error
93-
.toThrowError(Error, 'Invalid secret part: checksum invalid')
89+
}).toThrow(new Error('Invalid secret part: checksum invalid'))
9490
})
9591
})
9692
})

packages/secret-numbers/test/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('Utils', () => {
8181
'024286',
8282
]
8383
const entropy = hexToBytes('76ebb2d06879b45b7568fb9c1ded097c')
84-
expect(secretToEntropy(secret)).toEqual(entropy)
84+
expect(Array.from(secretToEntropy(secret))).toEqual(Array.from(entropy))
8585
})
8686

8787
it('parseSecretString with spaces valid', () => {

0 commit comments

Comments
 (0)