build: Initial linting setup (#1560)

* sets up linting config and runs `yarn lint --fix` once, so that all changes will show up correctly in future PRs.

* Note that there are still a lot of linter errors.
This commit is contained in:
Nathan Nichols
2021-08-26 21:22:40 -05:00
committed by Mayukha Vadari
parent 12cfed5c17
commit 8b95ee5fab
286 changed files with 15508 additions and 12691 deletions

View File

@@ -1,35 +1,36 @@
import assert from 'assert-diff'
import assert from "assert-diff";
import setupClient from './setupClient'
import {getFaucetUrl, FaucetNetwork} from '../src/wallet/wallet-generation'
import { getFaucetUrl, FaucetNetwork } from "../src/wallet/wallet-generation";
describe('Get Faucet URL', function () {
beforeEach(setupClient.setup)
afterEach(setupClient.teardown)
import setupClient from "./setupClient";
it('returns the Devnet URL', function () {
const expectedFaucet = FaucetNetwork.Devnet
this.client.connection._url = FaucetNetwork.Devnet
describe("Get Faucet URL", function () {
beforeEach(setupClient.setup);
afterEach(setupClient.teardown);
assert.strictEqual(getFaucetUrl(this.client), expectedFaucet)
})
it("returns the Devnet URL", function () {
const expectedFaucet = FaucetNetwork.Devnet;
this.client.connection._url = FaucetNetwork.Devnet;
it('returns the Testnet URL', function () {
const expectedFaucet = FaucetNetwork.Testnet
this.client.connection._url = FaucetNetwork.Testnet
assert.strictEqual(getFaucetUrl(this.client), expectedFaucet);
});
assert.strictEqual(getFaucetUrl(this.client), expectedFaucet)
})
it("returns the Testnet URL", function () {
const expectedFaucet = FaucetNetwork.Testnet;
this.client.connection._url = FaucetNetwork.Testnet;
it('returns the Testnet URL with the XRPL Labs server', function () {
const expectedFaucet = FaucetNetwork.Testnet
this.client.connection._url = 'wss://testnet.xrpl-labs.com'
assert.strictEqual(getFaucetUrl(this.client), expectedFaucet);
});
assert.strictEqual(getFaucetUrl(this.client), expectedFaucet)
})
it("returns the Testnet URL with the XRPL Labs server", function () {
const expectedFaucet = FaucetNetwork.Testnet;
this.client.connection._url = "wss://testnet.xrpl-labs.com";
it('returns undefined if not a Testnet or Devnet server URL', function () {
assert.strictEqual(getFaucetUrl(this.client), expectedFaucet);
});
it("returns undefined if not a Testnet or Devnet server URL", function () {
// Info: setupClient.setup creates a connection to 'localhost'
assert.strictEqual(getFaucetUrl(this.client), undefined)
})
})
assert.strictEqual(getFaucetUrl(this.client), undefined);
});
});