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:
Nathan Nichols
2021-08-26 21:22:40 -05:00
committed by Mayukha Vadari
parent 12cfed5c17
commit 8b95ee5fab
286 changed files with 15508 additions and 12691 deletions

View File

@@ -1,35 +1,37 @@
import { ValidationError } from 'xrpl-local/common/errors'
import { verifyCheckCancel} from './../../src/models/transactions/checkCancel'
import { assert } from 'chai'
import { assert } from "chai";
import { ValidationError } from "xrpl-local/common/errors";
import { verifyCheckCancel } from "../../src/models/transactions/checkCancel";
/**
* CheckCancel Transaction Verification Testing
* CheckCancel Transaction Verification Testing.
*
* Providing runtime verification testing for each specific transaction type
* Providing runtime verification testing for each specific transaction type.
*/
describe('CheckCancel Transaction Verification', function () {
describe("CheckCancel Transaction Verification", function () {
it(`verifies valid CheckCancel`, function () {
const validCheckCancel = {
Account: "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
TransactionType: "CheckCancel",
CheckID:
"49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0",
} as any;
it (`verifies valid CheckCancel`, () => {
const validCheckCancel = {
Account : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
TransactionType : "CheckCancel",
CheckID : "49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0"
} as any
assert.doesNotThrow(() => verifyCheckCancel(validCheckCancel));
});
assert.doesNotThrow(() => verifyCheckCancel(validCheckCancel))
})
it(`throws w/ invalid CheckCancel`, function () {
const invalidCheckID = {
Account: "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
TransactionType: "CheckCancel",
CheckID: 496473456789876545678909876545678,
} as any;
it (`throws w/ invalid CheckCancel`, () => {
const invalidCheckID = {
Account : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
TransactionType : "CheckCancel",
CheckID : 496473456789876545678909876545678
} as any
assert.throws(
() => verifyCheckCancel(invalidCheckID),
ValidationError,
"CheckCancel: invalid CheckID"
)
})
})
assert.throws(
() => verifyCheckCancel(invalidCheckID),
ValidationError,
"CheckCancel: invalid CheckID"
);
});
});