refactor: rename all test files to camelCase (#1562)

* rename files to camelCase

* fix imports

* more renames

* pull all client tests out of individual folders

* fix imports

* fix tests
This commit is contained in:
Mayukha Vadari
2021-08-25 16:11:04 -04:00
parent da9feffada
commit f9fe5936b1
366 changed files with 443 additions and 438 deletions

35
test/walletGeneration.ts Normal file
View File

@@ -0,0 +1,35 @@
import assert from 'assert-diff'
import setupClient from './setupClient'
import {getFaucetUrl, FaucetNetwork} from '../src/wallet/wallet-generation'
describe('Get Faucet URL', function () {
beforeEach(setupClient.setup)
afterEach(setupClient.teardown)
it('returns the Devnet URL', function () {
const expectedFaucet = FaucetNetwork.Devnet
this.client.connection._url = FaucetNetwork.Devnet
assert.strictEqual(getFaucetUrl(this.client), expectedFaucet)
})
it('returns the Testnet URL', function () {
const expectedFaucet = FaucetNetwork.Testnet
this.client.connection._url = FaucetNetwork.Testnet
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'
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)
})
})