feat: Jest Test Runner (#2170)

This commit is contained in:
justinr1234
2023-02-03 17:03:07 -06:00
committed by GitHub
parent 5a63f18faf
commit 5fe480ece4
229 changed files with 13497 additions and 17033 deletions

View File

@@ -1,39 +1,47 @@
import _ from 'lodash'
import { SignerListSet } from 'xrpl-local'
import { SignerListSet } from '../../../src'
import serverUrl from '../serverUrl'
import { setupClient, teardownClient } from '../setup'
import {
setupClient,
teardownClient,
type XrplIntegrationTestContext,
} from '../setup'
import { testTransaction } from '../utils'
// how long before each test case times out
const TIMEOUT = 20000
describe('SignerListSet', function () {
this.timeout(TIMEOUT)
let testContext: XrplIntegrationTestContext
beforeEach(_.partial(setupClient, serverUrl))
afterEach(teardownClient)
it('base', async function () {
const tx: SignerListSet = {
TransactionType: 'SignerListSet',
Account: this.wallet.classicAddress,
SignerEntries: [
{
SignerEntry: {
Account: 'r5nx8ZkwEbFztnc8Qyi22DE9JYjRzNmvs',
SignerWeight: 1,
},
},
{
SignerEntry: {
Account: 'r3RtUvGw9nMoJ5FuHxuoVJvcENhKtuF9ud',
SignerWeight: 1,
},
},
],
SignerQuorum: 2,
}
await testTransaction(this.client, tx, this.wallet)
beforeEach(async () => {
testContext = await setupClient(serverUrl)
})
afterEach(async () => teardownClient(testContext))
it(
'base',
async () => {
const tx: SignerListSet = {
TransactionType: 'SignerListSet',
Account: testContext.wallet.classicAddress,
SignerEntries: [
{
SignerEntry: {
Account: 'r5nx8ZkwEbFztnc8Qyi22DE9JYjRzNmvs',
SignerWeight: 1,
},
},
{
SignerEntry: {
Account: 'r3RtUvGw9nMoJ5FuHxuoVJvcENhKtuF9ud',
SignerWeight: 1,
},
},
],
SignerQuorum: 2,
}
await testTransaction(testContext.client, tx, testContext.wallet)
},
TIMEOUT,
)
})