mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
refactor: move fixtures closer to tests (part 2) (#1561)
* move echo * move fee * move subscribe/unsubscribe * move ledger_current * move ledger_data * move submit/submit_multisigned * remove account_tx/account_offers/gateway_balances * move account_info * remove ledger_entry * remove tx * remove account_lines * remove ripple_path_find * remove ledger * remove book_offers * move ping * remove global_config * move test_command * additional mock-rippled cleanup * add explanatory comment to mock.addResponse
This commit is contained in:
@@ -60,6 +60,9 @@ export default <TestSuite>{
|
||||
mockRippled
|
||||
) => {
|
||||
mockRippled.addResponse({command: 'server_info'}, rippled.server_info.normal)
|
||||
mockRippled.addResponse({command: 'fee'}, rippled.fee)
|
||||
mockRippled.addResponse({command: 'ledger_current'}, rippled.ledger_current)
|
||||
mockRippled.addResponse({command: 'account_info'}, rippled.account_info.normal)
|
||||
const secret = 'shsWGZcmZz6YsWWmcnpfr6fLTdtFV'
|
||||
const payment = {
|
||||
source: {
|
||||
@@ -168,6 +171,9 @@ export default <TestSuite>{
|
||||
|
||||
'succeeds - prepared payment': async (client, address, mockRippled) => {
|
||||
mockRippled.addResponse({command: 'server_info'}, rippled.server_info.normal)
|
||||
mockRippled.addResponse({command: 'fee'}, rippled.fee)
|
||||
mockRippled.addResponse({command: 'ledger_current'}, rippled.ledger_current)
|
||||
mockRippled.addResponse({command: 'account_info'}, rippled.account_info.normal)
|
||||
const payment = await client.preparePayment(address, {
|
||||
source: {
|
||||
address: address,
|
||||
@@ -244,6 +250,9 @@ export default <TestSuite>{
|
||||
mockRippled
|
||||
) => {
|
||||
mockRippled.addResponse({command: 'server_info'}, rippled.server_info.normal)
|
||||
mockRippled.addResponse({command: 'fee'}, rippled.fee)
|
||||
mockRippled.addResponse({command: 'ledger_current'}, rippled.ledger_current)
|
||||
mockRippled.addResponse({command: 'account_info'}, rippled.account_info.normal)
|
||||
const payment = await client.preparePayment(address, {
|
||||
source: {
|
||||
address: address,
|
||||
@@ -272,6 +281,9 @@ export default <TestSuite>{
|
||||
mockRippled
|
||||
) => {
|
||||
mockRippled.addResponse({command: 'server_info'}, rippled.server_info.normal)
|
||||
mockRippled.addResponse({command: 'fee'}, rippled.fee)
|
||||
mockRippled.addResponse({command: 'ledger_current'}, rippled.ledger_current)
|
||||
mockRippled.addResponse({command: 'account_info'}, rippled.account_info.normal)
|
||||
const order = {
|
||||
direction: 'sell',
|
||||
quantity: {
|
||||
|
||||
Reference in New Issue
Block a user