mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-29 16:45:49 +00:00
refactor: improves mock rippled structure (#1569)
* better error handling + tests * fix tests * change addResponse to take a string instead of a Request * remove unneeded change * respond to comments * fix tests, re-lint * improve error message
This commit is contained in:
@@ -9,10 +9,7 @@ import { TestSuite, assertResultMatch } from "../testUtils";
|
||||
*/
|
||||
export default <TestSuite>{
|
||||
"request account_objects": async (client, address, mockRippled) => {
|
||||
mockRippled.addResponse(
|
||||
{ command: "account_objects", account: address },
|
||||
rippled.account_objects.normal
|
||||
);
|
||||
mockRippled.addResponse("account_objects", rippled.account_objects.normal);
|
||||
const result = await client.request({
|
||||
command: "account_objects",
|
||||
account: address,
|
||||
@@ -30,10 +27,7 @@ export default <TestSuite>{
|
||||
address,
|
||||
mockRippled
|
||||
) => {
|
||||
mockRippled.addResponse(
|
||||
{ command: "account_objects", account: address },
|
||||
rippled.account_objects.normal
|
||||
);
|
||||
mockRippled.addResponse("account_objects", rippled.account_objects.normal);
|
||||
const result = await client.request({
|
||||
command: "account_objects",
|
||||
account: address,
|
||||
|
||||
Reference in New Issue
Block a user