aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-30 05:52:10 +0800
committerFabio Berger <me@fabioberger.com>2017-05-30 05:52:10 +0800
commitf3d5690d56c3e4c7243f72049c98cfde799413af (patch)
tree1bb9774ecaf0c409690bf16ae86896611027d8a5 /src/utils
parent919585cd7972bae1667f67c9fa034251f27b14a8 (diff)
downloaddexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.gz
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.bz2
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.lz
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.xz
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.zst
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.zip
Add tests for getTokensAsync including schema validation
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/schema_validator.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils/schema_validator.ts b/src/utils/schema_validator.ts
index 61f4c09c8..8132f7414 100644
--- a/src/utils/schema_validator.ts
+++ b/src/utils/schema_validator.ts
@@ -1,5 +1,6 @@
import {Validator, ValidatorResult} from 'jsonschema';
import {ecSignatureSchema, ecSignatureParameter} from '../schemas/ec_signature_schema';
+import {tokenSchema} from '../schemas/token_schema';
export class SchemaValidator {
private validator: Validator;
@@ -7,6 +8,7 @@ export class SchemaValidator {
this.validator = new Validator();
this.validator.addSchema(ecSignatureParameter, ecSignatureParameter.id);
this.validator.addSchema(ecSignatureSchema, ecSignatureSchema.id);
+ this.validator.addSchema(tokenSchema, tokenSchema.id);
}
public validate(instance: object, schema: Schema): ValidatorResult {
return this.validator.validate(instance, schema);