aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/test
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-24 08:28:17 +0800
committerFabio Berger <me@fabioberger.com>2018-05-24 08:28:17 +0800
commit59890f2c832a99372a3cdc423a23a4769f214fdc (patch)
treececde7a1ca4d60db49e1f32e76a243a7d2c2b80d /packages/json-schemas/test
parent2c70162beed505bfccb4acf154d3a693f9a5ce7f (diff)
downloaddexon-sol-tools-59890f2c832a99372a3cdc423a23a4769f214fdc.tar
dexon-sol-tools-59890f2c832a99372a3cdc423a23a4769f214fdc.tar.gz
dexon-sol-tools-59890f2c832a99372a3cdc423a23a4769f214fdc.tar.bz2
dexon-sol-tools-59890f2c832a99372a3cdc423a23a4769f214fdc.tar.lz
dexon-sol-tools-59890f2c832a99372a3cdc423a23a4769f214fdc.tar.xz
dexon-sol-tools-59890f2c832a99372a3cdc423a23a4769f214fdc.tar.zst
dexon-sol-tools-59890f2c832a99372a3cdc423a23a4769f214fdc.zip
Fix Hex regex and tests
Diffstat (limited to 'packages/json-schemas/test')
-rw-r--r--packages/json-schemas/test/schema_test.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts
index d8479ef4f..a7d510122 100644
--- a/packages/json-schemas/test/schema_test.ts
+++ b/packages/json-schemas/test/schema_test.ts
@@ -14,6 +14,7 @@ const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
const {
numberSchema,
addressSchema,
+ hexSchema,
orderCancellationRequestsSchema,
orderFillOrKillRequestsSchema,
orderFillRequestsSchema,
@@ -86,12 +87,12 @@ describe('Schema', () => {
describe('#hexSchema', () => {
it('should validate valid hex string', () => {
const testCases = ['0x8b0292b11a196601ed2ce54b665cafeca0347d42', NULL_ADDRESS];
- validateAgainstSchema(testCases, addressSchema);
+ validateAgainstSchema(testCases, hexSchema);
});
it('should fail for invalid hex string', () => {
const testCases = ['0x', '0', '0x00', '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42'];
const shouldFail = true;
- validateAgainstSchema(testCases, addressSchema, shouldFail);
+ validateAgainstSchema(testCases, hexSchema, shouldFail);
});
});
describe('#orderHashSchema', () => {