mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +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:
@@ -2,30 +2,23 @@ import { assert } from "chai";
|
||||
|
||||
import { Client } from "xrpl-local";
|
||||
|
||||
import { TestSuite } from "../testUtils";
|
||||
|
||||
/**
|
||||
* 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>{
|
||||
"Client - implicit server port": () => {
|
||||
describe("client constructor", function () {
|
||||
it("Client - implicit server port", function () {
|
||||
new Client("wss://s1.ripple.com");
|
||||
},
|
||||
});
|
||||
|
||||
"Client invalid options": () => {
|
||||
it("Client invalid options", function () {
|
||||
// @ts-expect-error - This is intentionally invalid
|
||||
assert.throws(() => new Client({ invalid: true }));
|
||||
},
|
||||
});
|
||||
|
||||
"Client valid options": () => {
|
||||
it("Client valid options", function () {
|
||||
const client = new Client("wss://s:1");
|
||||
const privateConnectionUrl = (client.connection as any)._url;
|
||||
assert.deepEqual(privateConnectionUrl, "wss://s:1");
|
||||
},
|
||||
});
|
||||
|
||||
"Client invalid server uri": () => {
|
||||
it("Client invalid server uri", function () {
|
||||
assert.throws(() => new Client("wss//s:1"));
|
||||
},
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user