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:
Mayukha Vadari
2021-08-30 18:04:06 -04:00
parent 43802f9e22
commit 6268b9ea26
41 changed files with 3880 additions and 3699 deletions

View File

@@ -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/);
},
};
});
});