mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
* Let ripple-binary-codec to build on windows & nix Co-authored-by: Justintime <justinthenicholasoftime@protonmail.com>
25 lines
770 B
TypeScript
25 lines
770 B
TypeScript
import { assert } from 'chai'
|
|
import { isValidAddress } from 'xrpl-local'
|
|
|
|
describe('isValidAddress', function () {
|
|
it('Validates valid classic address', function () {
|
|
const classic = 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W'
|
|
assert(isValidAddress(classic))
|
|
})
|
|
|
|
it('Does not validate invalid classic address', function () {
|
|
const classic = 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENhqw96W'
|
|
assert(!isValidAddress(classic))
|
|
})
|
|
|
|
it('Validates valid X-Address', function () {
|
|
const xAddress = 'XV5sbjUmgPpvXv4ixFWZ5ptAYZ6PD28Sq49uo34VyjnmK5H'
|
|
assert(isValidAddress(xAddress))
|
|
})
|
|
|
|
it('Does not validate invalid X-Address', function () {
|
|
const xAddress = 'XV5sbjUmgPpvXv4ixFWZ5pfAYZ6PD28Sq49uo34VyjnmK5H'
|
|
assert(!isValidAddress(xAddress))
|
|
})
|
|
})
|