rename IC to Token

This commit is contained in:
Denis Angell
2023-02-06 10:19:01 -05:00
parent 9f15deed15
commit a679128f02
5 changed files with 18 additions and 13 deletions

View File

@@ -9,7 +9,7 @@ export async function teardownClient(this: Mocha.Context): Promise<void> {
}
// eslint-disable-next-line max-params -- need comments
async function initIC(
async function initToken(
client: Client,
wallet: Wallet,
destination: Wallet,
@@ -111,7 +111,7 @@ async function initIC(
export async function setupClient(
this: Mocha.Context,
server = serverUrl,
ic?: boolean | false,
token?: boolean | false,
): Promise<void> {
this.wallet = Wallet.generate()
this.destination = Wallet.generate()
@@ -124,8 +124,13 @@ export async function setupClient(
await fundAccount(this.client, this.wallet)
await fundAccount(this.client, this.destination)
await fundAccount(this.client, this.gateway)
if (ic) {
await initIC(this.client, this.wallet, this.destination, this.gateway)
if (token) {
await initToken(
this.client,
this.wallet,
this.destination,
this.gateway,
)
}
resolve()
})

View File

@@ -12,10 +12,10 @@ const TIMEOUT = 20000
describe('EscrowCreate', function () {
this.timeout(TIMEOUT)
beforeEach(_.partial(setupClient, serverUrl))
beforeEach(_.partial(setupClient, serverUrl, true))
afterEach(teardownClient)
it('native', async function () {
it('xrp test', async function () {
// get the most recent close_time from the standalone container for finish after.
const CLOSE_TIME: number = (
await this.client.request({
@@ -47,7 +47,7 @@ describe('EscrowCreate', function () {
)
})
it('ic', async function () {
it('token test', async function () {
// get the most recent close_time from the standalone container for finish after.
const CLOSE_TIME: number = (
await this.client.request({

View File

@@ -15,7 +15,7 @@ describe('PaymentChannelClaim', function () {
beforeEach(_.partial(setupClient, serverUrl, true))
afterEach(teardownClient)
it('native', async function () {
it('xrp test', async function () {
const wallet2 = await generateFundedWallet(this.client)
const paymentChannelCreate: PaymentChannelCreate = {
TransactionType: 'PaymentChannelCreate',
@@ -47,7 +47,7 @@ describe('PaymentChannelClaim', function () {
await testTransaction(this.client, paymentChannelClaim, this.wallet)
})
it('ic', async function () {
it('token test', async function () {
const paymentChannelCreate: PaymentChannelCreate = {
TransactionType: 'PaymentChannelCreate',
Account: this.wallet.classicAddress,

View File

@@ -14,7 +14,7 @@ describe('PaymentChannelCreate', function () {
beforeEach(_.partial(setupClient, serverUrl, true))
afterEach(teardownClient)
it('native', async function () {
it('xrp test', async function () {
const wallet2 = await generateFundedWallet(this.client)
const paymentChannelCreate: PaymentChannelCreate = {
TransactionType: 'PaymentChannelCreate',
@@ -27,7 +27,7 @@ describe('PaymentChannelCreate', function () {
await testTransaction(this.client, paymentChannelCreate, this.wallet)
})
it('ic', async function () {
it('token test', async function () {
const paymentChannelCreate: PaymentChannelCreate = {
TransactionType: 'PaymentChannelCreate',
Account: this.wallet.classicAddress,

View File

@@ -15,7 +15,7 @@ describe('PaymentChannelFund', function () {
beforeEach(_.partial(setupClient, serverUrl, true))
afterEach(teardownClient)
it('native', async function () {
it('xrp test', async function () {
const wallet2 = await generateFundedWallet(this.client)
const paymentChannelCreate: PaymentChannelCreate = {
TransactionType: 'PaymentChannelCreate',
@@ -45,7 +45,7 @@ describe('PaymentChannelFund', function () {
await testTransaction(this.client, paymentChannelFund, this.wallet)
})
it('ic', async function () {
it('token test', async function () {
const paymentChannelCreate: PaymentChannelCreate = {
TransactionType: 'PaymentChannelCreate',
Account: this.wallet.classicAddress,