{"size": 1205, "ext": "js", "max_stars_repo_path": "test/global/vulcanval.js", "max_stars_repo_name": "vulcan-estudios/vulcanval", "max_stars_repo_stars_event_min_datetime": "2016-07-04T12:44:00.000Z", "max_stars_repo_stars_event_max_datetime": "2017-09-22T22:37:07.000Z", "max_issues_repo_path": "test/global/vulcanval.js", "max_issues_repo_name": "vulcan-estudios/vulcanval", "max_issues_repo_issues_event_min_datetime": "2016-09-15T21:59:04.000Z", "max_issues_repo_issues_event_max_datetime": "2017-09-23T03:21:45.000Z", "max_forks_repo_path": "test/global/vulcanval.js", "max_forks_repo_name": "vulcan-estudios/vulcanval", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 9, "max_issues_count": 9, "max_forks_count": null, "avg_line_length": 30.8974358974, "max_line_length": 85, "alphanum_fraction": 0.7029045643}
require('./pre');

const assert = require('chai').assert;
const expect = require('chai').expect;
const vulcanval = require('../../src/js/vulcanval');


var vv;


describe('Module vulcanval', function () {

  it('Has global properties and methods', function () {
    assert.isString(vulcanval.version);
    assert.isObject(vulcanval.log);
    assert.isObject(vulcanval.utils);
    assert.isObject(vulcanval.validator);
    assert.isObject(vulcanval.settings);
    assert.isFunction(vulcanval.extendLocale);
    assert.isFunction(vulcanval.addValidator);
    assert.isFunction(vulcanval.convertMapTo);
  });

  it('Instantiate vulcan validator', function () {

    vv = vulcanval({
      fields: [{name: 'a'}]
    });

    assert.isObject(vv);
    assert.isObject(vv.settings, '.settings should be an object');
    assert.isFunction(vv.rawValidation, '.rawValidation should be a function');
    assert.isFunction(vv.validate, '.validate should be a function');
    assert.isFunction(vv.validateFieldset, '.validateFieldset should be a function');
    assert.isFunction(vv.validateField, '.validateField should be a function');
    assert.isFunction(vv.cleanMap, '.cleanMap should be a function');
  });
});
