extras.spec.js 796 B

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. var jsonSchemaTest = require('json-schema-test')
  3. , getAjvInstances = require('./ajv_instances')
  4. , options = require('./ajv_options')
  5. , suite = require('./browser_test_suite')
  6. , after = require('./after_test');
  7. var instances = getAjvInstances(options, {
  8. $data: true,
  9. unknownFormats: ['allowedUnknown']
  10. });
  11. jsonSchemaTest(instances, {
  12. description: 'Extra keywords schemas tests of ' + instances.length + ' ajv instances with different options',
  13. suites: {
  14. 'extras': typeof window == 'object'
  15. ? suite(require('./extras/{**/,}*.json', {mode: 'list'}))
  16. : './extras/{**/,}*.json'
  17. },
  18. assert: require('./chai').assert,
  19. afterError: after.error,
  20. afterEach: after.each,
  21. cwd: __dirname,
  22. hideFolder: 'extras/',
  23. timeout: 90000
  24. });