This commit is contained in:
Dobie Wollert
2015-12-16 09:12:35 -08:00
parent f9c9672818
commit f94ca33b9e
805 changed files with 67409 additions and 24609 deletions

26
node_modules/validator/test/client-side.js generated vendored Normal file
View File

@ -0,0 +1,26 @@
var assert = require('assert')
, validator = require('../validator')
, min = require('../validator.min');
describe('Minified version', function () {
it('should export the same things as the server-side version', function () {
for (var key in validator) {
assert.equal(typeof validator[key], typeof min[key], 'Minified version did not export ' + key);
}
});
it('should be up to date', function () {
assert.equal(min.version, validator.version, 'Minified version mismatch. Run `make min`');
});
it('should validate strings', function () {
assert.equal(min.isEmail('foo@bar.com'), true);
assert.equal(min.isEmail('foo'), false);
});
it('should sanitize strings', function () {
assert.equal(min.toBoolean('1'), true);
});
});