2024-09-05 22:06:01 +03:00
|
|
|
import { typed } from '@fuman/utils'
|
2024-12-03 09:55:37 +03:00
|
|
|
import { expect } from 'vitest'
|
2024-08-13 04:53:07 +03:00
|
|
|
|
2024-04-25 05:43:17 +03:00
|
|
|
// consider Buffers equal to Uint8Arrays
|
|
|
|
expect.addEqualityTesters([
|
|
|
|
function (a, b) {
|
|
|
|
if (a instanceof Uint8Array && b instanceof Uint8Array) {
|
2024-09-05 22:06:01 +03:00
|
|
|
return typed.equal(a, b)
|
2024-04-25 05:43:17 +03:00
|
|
|
}
|
2024-08-13 04:53:07 +03:00
|
|
|
},
|
|
|
|
])
|