can-validate-legacy
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -43,15 +43,15 @@ /* jshint asi: false */ | ||
QUnit.test("when validateOnInit is not set, it should not run validation",function(){ | ||
QUnit.test("when validateOnInit is not set, it should not run validation",function(assert) { | ||
validatedMap = new ValidatedMap(); | ||
QUnit.ok(isEmptyObject(validatedMap.errors)); | ||
assert.ok(isEmptyObject(validatedMap.errors)); | ||
}); | ||
QUnit.test("validations run when value is set",function(){ | ||
QUnit.test("validations run when value is set",function(assert) { | ||
validatedMap = new ValidatedMap(); | ||
validatedMap.attr("myNumber", ""); | ||
QUnit.equal(validatedMap.errors.myNumber.length, 1); | ||
assert.equal(validatedMap.errors.myNumber.length, 1); | ||
}); | ||
// #27 - Validate method does not resolve computes | ||
QUnit.test("when validate method is called, resolves computes before calling Validate method",function(){ | ||
QUnit.test("when validate method is called, resolves computes before calling Validate method",function(assert) { | ||
validatedMap = new ValidatedMap({ | ||
@@ -68,3 +68,3 @@ isRequired: true, | ||
} | ||
QUnit.ok(success); | ||
assert.ok(success); | ||
}); | ||
@@ -78,3 +78,3 @@ | ||
*/ | ||
QUnit.test("when creating multiple instances of the same map, each instance is discrete",function(){ | ||
QUnit.test("when creating multiple instances of the same map, each instance is discrete",function(assert) { | ||
// Doing this should not affect our control. If bug exists, it will | ||
@@ -89,8 +89,8 @@ // affect all instances | ||
secondaryMap.attr("computedProp", ""); | ||
QUnit.equal(isEmptyObject(secondaryMap.attr("errors")), true, 'control map validates successfully'); | ||
assert.equal(isEmptyObject(secondaryMap.attr("errors")), true, 'control map validates successfully'); | ||
// other map validates, sets error | ||
validatedMap.attr("computedProp", ""); | ||
QUnit.equal(validatedMap.attr("computedProp"), ""); | ||
QUnit.ok(typeof validatedMap.attr("errors.computedProp") !== "undefined", 'other map validates, sets error'); | ||
assert.equal(validatedMap.attr("computedProp"), ""); | ||
assert.ok(typeof validatedMap.attr("errors.computedProp") !== "undefined", 'other map validates, sets error'); | ||
}); | ||
@@ -119,3 +119,3 @@ | ||
QUnit.module("Validate.js Shim", { | ||
setup: function(){ | ||
beforeEach: function(assert) { | ||
validatedMap = new ShimValidatedMap({}); | ||
@@ -125,17 +125,17 @@ } | ||
QUnit.test("validates on init by default",function(){ | ||
QUnit.equal(validatedMap.attr('errors').myNumber.length, 1); | ||
QUnit.test("validates on init by default",function(assert) { | ||
assert.equal(validatedMap.attr('errors').myNumber.length, 1); | ||
}); | ||
QUnit.test("validates on init by default",function(){ | ||
QUnit.equal(validatedMap.errors.myNumber.length, 1); | ||
QUnit.test("validates on init by default",function(assert) { | ||
assert.equal(validatedMap.errors.myNumber.length, 1); | ||
}); | ||
QUnit.test("does not validate on init, when validate on init is false",function(){ | ||
QUnit.equal(validatedMap.errors.myString, undefined); | ||
QUnit.test("does not validate on init, when validate on init is false",function(assert) { | ||
assert.equal(validatedMap.errors.myString, undefined); | ||
}); | ||
QUnit.test("runs validation on value",function(){ | ||
QUnit.test("runs validation on value",function(assert) { | ||
validatedMap.attr("myString", ""); | ||
QUnit.equal(validatedMap.errors.myString.length, 1); | ||
assert.equal(validatedMap.errors.myString.length, 1); | ||
}); |
@@ -1,2 +0,2 @@ | ||
/*can-validate-legacy@2.0.0#can-validate*/ | ||
/*can-validate-legacy@2.0.1#can-validate*/ | ||
define([ | ||
@@ -3,0 +3,0 @@ 'require', |
@@ -1,2 +0,2 @@ | ||
/*can-validate-legacy@2.0.0#map/validate/validate*/ | ||
/*can-validate-legacy@2.0.1#map/validate/validate*/ | ||
define([ | ||
@@ -3,0 +3,0 @@ 'require', |
@@ -1,2 +0,2 @@ | ||
/*can-validate-legacy@2.0.0#shims/validatejs*/ | ||
/*can-validate-legacy@2.0.1#shims/validatejs*/ | ||
define([ | ||
@@ -3,0 +3,0 @@ 'require', |
@@ -1,2 +0,2 @@ | ||
/*can-validate-legacy@2.0.0#can-validate*/ | ||
/*can-validate-legacy@2.0.1#can-validate*/ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ var dev = require('can-log/dev/dev'); |
@@ -1,2 +0,2 @@ | ||
/*can-validate-legacy@2.0.0#map/validate/validate*/ | ||
/*can-validate-legacy@2.0.1#map/validate/validate*/ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ var assign = require('can-assign'); |
@@ -1,2 +0,2 @@ | ||
/*can-validate-legacy@2.0.0#shims/validatejs*/ | ||
/*can-validate-legacy@2.0.1#shims/validatejs*/ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ var validate = require('../can-validate.js'); |
@@ -167,3 +167,3 @@ /*[process-shim]*/ | ||
/*can-validate-legacy@2.0.0#can-validate*/ | ||
/*can-validate-legacy@2.0.1#can-validate*/ | ||
define('can-validate-legacy', [ | ||
@@ -203,3 +203,3 @@ 'require', | ||
}); | ||
/*can-validate-legacy@2.0.0#map/validate/validate*/ | ||
/*can-validate-legacy@2.0.1#map/validate/validate*/ | ||
define('can-validate-legacy/map/validate/validate', [ | ||
@@ -413,3 +413,3 @@ 'require', | ||
}); | ||
/*can-validate-legacy@2.0.0#shims/validatejs*/ | ||
/*can-validate-legacy@2.0.1#shims/validatejs*/ | ||
define('can-validate-legacy/shims/validatejs', [ | ||
@@ -416,0 +416,0 @@ 'require', |
{ | ||
"name": "can-validate-legacy", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"main": "can-validate.js", | ||
@@ -45,6 +45,6 @@ "description": "Validation plugin for CanJS that provides an abstraction layer to your validation library of choice (Shim may be required).", | ||
"steal": "^1.2.10", | ||
"steal-qunit": "^1.0.1", | ||
"steal-qunit": "^2.0.0", | ||
"steal-stache": "^3.0.1", | ||
"steal-tools": "^1.1.2", | ||
"testee": "^0.8.0" | ||
"testee": "^0.9.0" | ||
}, | ||
@@ -51,0 +51,0 @@ "browser": { |
# can-validate-legacy | ||
[](https://gitter.im/canjs/canjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[](https://github.com/canjs/can-validate-legacy/blob/master/LICENSE.md) | ||
[](https://www.bitovi.com/community/slack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[](https://forums.bitovi.com/?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[](https://github.com/canjs/can-validate-legacy/blob/master/LICENSE.md) | ||
[](https://www.npmjs.com/package/can-validate-legacy) | ||
[](https://travis-ci.org/canjs/can-validate-legacy) | ||
[](https://ci.appveyor.com/project/matthewp/can-validate-legacy) | ||
[](https://coveralls.io/github/canjs/can-validate-legacy?branch=master) | ||
[](https://greenkeeper.io/) | ||
@@ -28,2 +27,1 @@ | ||
[MIT](https://github.com/canjs/can-validate-legacy/blob/master/LICENSE.md) | ||
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
124116
27
2