Sha256: 63435b90c9d716d96c83fd2223fb112acf53868f7553049ee6fb0084c19cea8e

Contents?: true

Size: 644 Bytes

Versions: 44

Compression:

Stored size: 644 Bytes

Contents

var tape = require('tape')
var fs = require('fs')
var validator = require('../')

var files = fs.readdirSync(__dirname+'/json-schema-draft4')
  .map(function(file) {
    if (file === 'definitions.json') return null
    if (file === 'refRemote.json') return null
    return require('./json-schema-draft4/'+file)
  })
  .filter(Boolean)

files.forEach(function(file) {
  file.forEach(function(f) {
    tape('json-schema-test-suite '+f.description, function(t) {
      var validate = validator(f.schema)
      f.tests.forEach(function(test) {
        t.same(validate(test.data), test.valid, test.description)
      })
      t.end()
    })
  })
})

Version data entries

44 entries across 39 versions & 12 rubygems

Version Path
optimacms-0.4.3 spec/dummy/node_modules/is-my-json-valid/test/json-schema.js
optimacms-0.4.2 spec/dummy/node_modules/is-my-json-valid/test/json-schema.js
locomotivecms-3.4.0 app/javascript/node_modules/is-my-json-valid/test/json-schema.js
guard-sass-lint-0.1.2 node_modules/is-my-json-valid/test/json-schema.js
guard-sass-lint-0.1.1 node_modules/is-my-json-valid/test/json-schema.js
lanes-0.8.0 node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema.js
lanes-0.8.0 node_modules/is-my-json-valid/test/json-schema.js
node-compiler-0.9.1 vendor/node/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
node-compiler-0.9.0 vendor/node-v7.2.1/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
select_all-rails-0.3.1 node_modules/is-my-json-valid/test/json-schema.js
node-compiler-0.8.0 vendor/node-v7.2.0/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
node-compiler-0.7.0 vendor/node-v6.9.1/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
node-compiler-0.7.0 vendor/node-v7.1.0/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
tck-lambdas-0.3.10 lib/tck/lambdas/chistacojs/source/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
tck-lambdas-0.3.9 lib/tck/lambdas/chistacojs/source/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
tck-lambdas-0.3.8 lib/tck/lambdas/chistacojs/source/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
tck-lambdas-0.3.7 lib/tck/lambdas/chistacojs/source/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
tck-lambdas-0.3.6 lib/tck/lambdas/chistacojs/source/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
tck-lambdas-0.3.5 lib/tck/lambdas/chistacojs/source/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js
tck-lambdas-0.3.4 lib/tck/lambdas/chistacojs/source/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js