Files
xahau.js/packages/xrpl/test/models/DIDDelete.test.ts
Mayukha Vadari c8f25a6347 feat: add support for XLS-40d + add script to auto-generate models from rippled code (#2491)
Add support for XLS-40 and adds a script to automatically
generate transaction models from rippled source code.

### Context of Change

https://github.com/XRPLF/XRPL-Standards/pull/136
https://github.com/XRPLF/rippled/pull/4636
2023-11-15 16:19:50 -06:00

35 lines
864 B
TypeScript

import { assert } from 'chai'
import { validate } from '../../src'
import { validateDIDDelete } from '../../src/models/transactions/DIDDelete'
/**
* DIDDelete Transaction Verification Testing.
*
* Providing runtime verification testing for each specific transaction type.
*/
describe('DIDDelete', function () {
let tx
beforeEach(function () {
tx = {
Account: 'rfmDuhDyLGgx94qiwf3YF8BUV5j6KSvE8',
Fee: '10',
Flags: 2147483648,
Sequence: 4,
TransactionType: 'DIDDelete',
} as any
})
it('verifies valid DIDDelete', function () {
assert.doesNotThrow(() => validateDIDDelete(tx))
assert.doesNotThrow(() => validate(tx))
})
it('throws on invalid DIDDelete', function () {
tx.FakeField = 'blah'
assert.doesNotThrow(() => validateDIDDelete(tx))
assert.doesNotThrow(() => validate(tx))
})
})