Permalink
Browse files

No need to use the ‘new’ keyword in order to initialize Amanda

  • Loading branch information...
1 parent 16d4bfa commit 36dbb634720adb3d6cef8d75f43d4799b848d902 @Baggz committed Mar 12, 2012
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../dist/latest.js');
+ var amanda = require('../../dist/latest.js');
}
/**
@@ -14,7 +14,7 @@ suite('JSON/addValidator', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
/**
* MyValidator
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -22,7 +22,7 @@ suite('JSON/Attribute/divisibleBy', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -25,7 +25,7 @@ suite('JSON/Attribute/enum', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error when an instance equals ‘superadmin’', function() {
Validator.validate('superadmin', schema, function(error) {
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -23,7 +23,7 @@ suite('JSON/Attribute/exclusiveMaximum', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -23,7 +23,7 @@ suite('JSON/Attribute/exclusiveMinimum', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
}
/**
@@ -22,7 +22,7 @@ suite('JSON/Attribute/format#alpha', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
}
/**
@@ -21,7 +21,7 @@ suite('JSON/Attribute/format#alphanumeric', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
}
/**
@@ -21,7 +21,7 @@ suite('JSON/Attribute/format#date', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
}
/**
@@ -21,7 +21,7 @@ suite('JSON/Attribute/format#decimal', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
var domains = require('../../../resources/domains.js');
var emails = require('../../../resources/emails.js');
}
@@ -23,7 +23,7 @@ suite('JSON/Attribute/format#email', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
}
/**
@@ -21,7 +21,7 @@ suite('JSON/Attribute/format#int', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
}
/**
@@ -21,7 +21,7 @@ suite('JSON/Attribute/format#ip', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
var percentage = require('../../../resources/percentage.js');
}
@@ -22,7 +22,7 @@ suite('JSON/Attribute/format#percentage', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
percentage.forEach(function(data) {
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
}
/**
@@ -21,7 +21,7 @@ suite('JSON/Attribute/format#array', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
}
/**
@@ -21,7 +21,7 @@ suite('JSON/Attribute/format#regex', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
}
/**
@@ -21,7 +21,7 @@ suite('JSON/Attribute/format#unsignedInt', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../../dist/latest.js');
+ var amanda = require('../../../../dist/latest.js');
var domains = require('../../../resources/domains.js');
var domainNames = require('../../../resources/domainNames.js');
var params = require('../../../resources/params.js');
@@ -24,7 +24,7 @@ suite('JSON/Attribute/format#url', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -22,7 +22,7 @@ suite('JSON/Attribute/maxItems', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -22,7 +22,7 @@ suite('JSON/Attribute/maxLength', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -22,7 +22,7 @@ suite('JSON/Attribute/maximum', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -22,7 +22,7 @@ suite('JSON/Attribute/minItems', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -22,7 +22,7 @@ suite('JSON/Attribute/minLength', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should not return an error', function() {
[
@@ -1,6 +1,6 @@
if (typeof module !== 'undefined' && module.exports) {
var expect = require('expect.js');
- var Amanda = require('../../../dist/latest.js');
+ var amanda = require('../../../dist/latest.js');
}
/**
@@ -22,7 +22,7 @@ suite('JSON/Attribute/minimum', function() {
/**
* Validator
*/
- var Validator = new Amanda('json');
+ var Validator = amanda('json');
test('should return an error', function() {
[
Oops, something went wrong. Retry.

0 comments on commit 36dbb63

Please sign in to comment.