Skip to content
Browse files

Remove the obsolete ‘errorMessages’ test suite

  • Loading branch information...
1 parent 7763b20 commit 0c87b5d9c72d68ffe39f3684db34ba1796a2105b @Baggz committed Mar 7, 2012
Showing with 0 additions and 91 deletions.
  1. +0 −91 tests/errorMessages.js
View
91 tests/errorMessages.js
@@ -1,91 +0,0 @@
-// Load dependencies
-var amanda = require('../dist/latest.js');
-
-/**
- * Test #1
- */
-exports['Test #1'] = function(test) {
-
- var count = 0;
-
- /**
- * Messages
- */
- var messages1 = {
- type: 'My custom message'
- };
-
- /**
- * Messages
- */
- var messages2 = {
- type: 'My custom message with placeholders {{property}} and {{propertyValue}} and {{validator}}.'
- };
-
- /**
- * Messages
- */
- var messages3 = {
- type: function(property, propertyValue, validator) {
- return 'My custom message with placeholders ' + property + ' and ' + propertyValue + ' and ' + validator + '.';
- }
- };
-
- amanda.validate(123, {
- type: 'string'
- }, {
- singleError: true,
- messages: messages1
- }, function(error) {
- count += 1;
- test.equal(error[0].message, 'My custom message');
- });
-
- amanda.validate(123, {
- type: 'string'
- }, {
- singleError: true,
- messages: messages2
- }, function(error) {
- count += 1;
- test.equal(error[0].message, 'My custom message with placeholders and 123 and string.');
- });
-
- amanda.validate({
- name: 123
- }, {
- type: 'object',
- properties: {
- name: {
- type: 'string'
- }
- }
- }, {
- singleError: true,
- messages: messages2
- }, function(error) {
- count += 1;
- test.equal(error[0].message, 'My custom message with placeholders name and 123 and string.');
- });
-
- amanda.validate({
- name: 123
- }, {
- type: 'object',
- properties: {
- name: {
- type: 'string'
- }
- }
- }, {
- singleError: true,
- messages: messages3
- }, function(error) {
- count += 1;
- test.equal(error[0].message, 'My custom message with placeholders name and 123 and string.');
- });
-
- test.equal(count, 4);
- test.done();
-
-};

0 comments on commit 0c87b5d

Please sign in to comment.
Something went wrong with that request. Please try again.