mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
* sets up linting config and runs `yarn lint --fix` once, so that all changes will show up correctly in future PRs. * Note that there are still a lot of linter errors.
19 lines
672 B
TypeScript
19 lines
672 B
TypeScript
import assert from "assert-diff";
|
|
|
|
import addresses from "../fixtures/addresses.json";
|
|
import { TestSuite } from "../testUtils";
|
|
|
|
export default <TestSuite>{
|
|
"returns true for valid address": async (client, address) => {
|
|
assert(client.isValidAddress("rLczgQHxPhWtjkaQqn3Q6UM8AbRbbRvs5K"));
|
|
assert(client.isValidAddress(addresses.ACCOUNT_X));
|
|
assert(client.isValidAddress(addresses.ACCOUNT_T));
|
|
},
|
|
|
|
"returns false for invalid address": async (client, address) => {
|
|
assert(!client.isValidAddress("foobar"));
|
|
assert(!client.isValidAddress(addresses.ACCOUNT_X.slice(0, -1)));
|
|
assert(!client.isValidAddress(addresses.ACCOUNT_T.slice(1)));
|
|
},
|
|
};
|