How to use the tv4.missing function in tv4

To help you get started, we’ve selected a few tv4 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dapphub / dapple / test / specs.js View on Github external
it('dappfile should be a valid json schema ', function (done) {
    tv4.addSchema('definitions', definitions);
    tv4.addSchema('http://json-schema.org/draft-04/hyper-schema', hyper_schema);
    tv4.addSchema('http://json-schema.org/draft-04/schema', schema);

    var valid = tv4.validate(dappfileSchema, hyper_schema);

    assert(valid, 'dapple.json is not a valid schema');
    assert(tv4.missing.length === 0,
      'some references are missing: ' + JSON.stringify(tv4.missing));

    done();
  });
});
github dapphub / dapple / test / specs.js View on Github external
it('dappfile should be a valid json schema ', function (done) {
    tv4.addSchema('definitions', definitions);
    tv4.addSchema('http://json-schema.org/draft-04/hyper-schema', hyper_schema);
    tv4.addSchema('http://json-schema.org/draft-04/schema', schema);

    var valid = tv4.validate(dappfileSchema, hyper_schema);

    assert(valid, 'dapple.json is not a valid schema');
    assert(tv4.missing.length === 0,
      'some references are missing: ' + JSON.stringify(tv4.missing));

    done();
  });
});