mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
add faucet test
This commit is contained in:
@@ -65,6 +65,17 @@ describe('Get Faucet host ', function () {
|
||||
)
|
||||
})
|
||||
|
||||
it('returns the Vala host', function () {
|
||||
const expectedFaucet = FaucetNetwork.Vala
|
||||
// @ts-expect-error Intentionally modifying private data for test
|
||||
testContext.client.connection.url = FaucetNetwork.Vala
|
||||
|
||||
assert.strictEqual(
|
||||
getFaucetHost(testContext.client as Client),
|
||||
expectedFaucet,
|
||||
)
|
||||
})
|
||||
|
||||
it('returns the correct faucetPath for Devnet host', function () {
|
||||
const expectedFaucetPath = FaucetNetworkPaths[FaucetNetwork.Devnet]
|
||||
// @ts-expect-error Intentionally modifying private data for test
|
||||
@@ -87,6 +98,17 @@ describe('Get Faucet host ', function () {
|
||||
)
|
||||
})
|
||||
|
||||
it('returns the correct faucetPath for Vala host', function () {
|
||||
const expectedFaucetPath = FaucetNetworkPaths[FaucetNetwork.Vala]
|
||||
// @ts-expect-error Intentionally modifying private data for test
|
||||
testContext.client.connection.url = FaucetNetwork.Vala
|
||||
|
||||
assert.strictEqual(
|
||||
getDefaultFaucetPath(getFaucetHost(testContext.client as Client)),
|
||||
expectedFaucetPath,
|
||||
)
|
||||
})
|
||||
|
||||
it('returns the correct faucetPath for undefined host', function () {
|
||||
const expectedFaucetPath = '/accounts'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user