Sun calculation js library which is fully based on formula from http://aa.quae.nl/en/reken/zonpositie.html
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
644 B
24 lines
644 B
7 years ago
|
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()
|
||
|
})
|
||
|
})
|
||
|
})
|