mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
build: Initial linting setup (#1560)
* sets up linting config and runs `yarn lint --fix` once, so that all changes will show up correctly in future PRs. * Note that there are still a lot of linter errors.
This commit is contained in:
committed by
Mayukha Vadari
parent
12cfed5c17
commit
8b95ee5fab
@@ -1,42 +1,43 @@
|
||||
import { ValidationError } from 'xrpl-local/common/errors'
|
||||
import { verifySetRegularKey } from './../../src/models/transactions/setRegularKey'
|
||||
import { assert } from 'chai'
|
||||
import { assert } from "chai";
|
||||
|
||||
import { ValidationError } from "xrpl-local/common/errors";
|
||||
|
||||
import { verifySetRegularKey } from "../../src/models/transactions/setRegularKey";
|
||||
|
||||
/**
|
||||
* SetRegularKey Transaction Verification Testing
|
||||
* SetRegularKey Transaction Verification Testing.
|
||||
*
|
||||
* Providing runtime verification testing for each specific transaction type
|
||||
* Providing runtime verification testing for each specific transaction type.
|
||||
*/
|
||||
describe('SetRegularKey Transaction Verification', function () {
|
||||
let account
|
||||
describe("SetRegularKey Transaction Verification", function () {
|
||||
let account;
|
||||
|
||||
beforeEach(() => {
|
||||
account = {
|
||||
TransactionType : "SetRegularKey",
|
||||
Account : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
Fee : "12",
|
||||
Flags : 0,
|
||||
RegularKey : "rAR8rR8sUkBoCZFawhkWzY4Y5YoyuznwD"
|
||||
} as any
|
||||
})
|
||||
beforeEach(function () {
|
||||
account = {
|
||||
TransactionType: "SetRegularKey",
|
||||
Account: "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
Fee: "12",
|
||||
Flags: 0,
|
||||
RegularKey: "rAR8rR8sUkBoCZFawhkWzY4Y5YoyuznwD",
|
||||
} as any;
|
||||
});
|
||||
|
||||
it (`verifies valid SetRegularKey`, () => {
|
||||
assert.doesNotThrow(() => verifySetRegularKey(account))
|
||||
})
|
||||
it(`verifies valid SetRegularKey`, function () {
|
||||
assert.doesNotThrow(() => verifySetRegularKey(account));
|
||||
});
|
||||
|
||||
it (`verifies w/o SetRegularKey`, () => {
|
||||
account.RegularKey = undefined
|
||||
assert.doesNotThrow(() => verifySetRegularKey(account))
|
||||
})
|
||||
it(`verifies w/o SetRegularKey`, function () {
|
||||
account.RegularKey = undefined;
|
||||
assert.doesNotThrow(() => verifySetRegularKey(account));
|
||||
});
|
||||
|
||||
it (`throws w/ invalid RegularKey`, () => {
|
||||
account.RegularKey = 12369846963
|
||||
it(`throws w/ invalid RegularKey`, function () {
|
||||
account.RegularKey = 12369846963;
|
||||
|
||||
assert.throws(
|
||||
() => verifySetRegularKey(account),
|
||||
ValidationError,
|
||||
"SetRegularKey: RegularKey must be a string"
|
||||
)
|
||||
})
|
||||
|
||||
})
|
||||
assert.throws(
|
||||
() => verifySetRegularKey(account),
|
||||
ValidationError,
|
||||
"SetRegularKey: RegularKey must be a string"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user