mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 01:08:02 +00:00
test: removes the use of TestSuite (#1566)* switch all methods to new format* clean up rippleClient* rename files to remove ripple from name* additional cleanup
This commit is contained in:
@@ -3,29 +3,28 @@ import binary from "ripple-binary-codec";
|
||||
|
||||
import requests from "../fixtures/requests";
|
||||
import responses from "../fixtures/responses";
|
||||
import { assertResultMatch, TestSuite } from "../testUtils";
|
||||
import setupClient from "../setupClient";
|
||||
import { assertResultMatch } from "../testUtils";
|
||||
|
||||
const { combine: REQUEST_FIXTURES } = requests;
|
||||
const { combine: RESPONSE_FIXTURES } = responses;
|
||||
|
||||
/**
|
||||
* Every test suite exports their tests in the default object.
|
||||
* - Check out the "TestSuite" type for documentation on the interface.
|
||||
* - Check out "test/client/index.ts" for more information about the test runner.
|
||||
*/
|
||||
export default <TestSuite>{
|
||||
async combine(client, address) {
|
||||
const combined = client.combine(REQUEST_FIXTURES.setDomain);
|
||||
assertResultMatch(combined, RESPONSE_FIXTURES.single, "sign");
|
||||
},
|
||||
describe("client.combine", function () {
|
||||
beforeEach(setupClient.setup);
|
||||
afterEach(setupClient.teardown);
|
||||
|
||||
"combine - different transactions": async (client, address) => {
|
||||
it("combine", async function () {
|
||||
const combined = this.client.combine(REQUEST_FIXTURES.setDomain);
|
||||
assertResultMatch(combined, RESPONSE_FIXTURES.single, "sign");
|
||||
});
|
||||
|
||||
it("combine - different transactions", async function () {
|
||||
const request = [REQUEST_FIXTURES.setDomain[0]];
|
||||
const tx = binary.decode(REQUEST_FIXTURES.setDomain[0]);
|
||||
tx.Flags = 0;
|
||||
request.push(binary.encode(tx));
|
||||
assert.throws(() => {
|
||||
client.combine(request);
|
||||
this.client.combine(request);
|
||||
}, /txJSON is not the same for all signedTransactions/);
|
||||
},
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user