Skip to content

Commit 15f292f

Browse files
committed
Fix lint errors.
1 parent 8e109fd commit 15f292f

File tree

4 files changed

+15
-29
lines changed

4 files changed

+15
-29
lines changed

test/fixtures/schema/message-literal.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ var schema = {
33
type: 'object',
44
fields: {
55
name: {type: 'string', required: true},
6-
job: {type: 'string', required: true, message: function(msg, params) {
7-
return util.format.apply(util, [msg].concat(params));
8-
}}
6+
job: {
7+
type: 'string',
8+
required: true,
9+
message: function(msg, params) {
10+
return util.format.apply(util, [msg].concat(params));
11+
}
12+
}
913
}
1014
}
1115

test/fixtures/schema/multiple-rules.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
var expect = require('chai').expect;
2-
3-
var email = require('../email')
1+
var email = require('../email')
42
, schema = {
53
type: 'object',
64
fields: {

test/spec/resolve.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ describe("async-validate:", function() {
7474
var schema = new Schema(descriptor)
7575
, source = {performer: {type: 'Person', name: 'joe'}};
7676
schema.validate(source, function(err, res){
77-
expect(err).to.be.null;
78-
expect(res).to.be.null;
77+
expect(err).to.eql(null);
78+
expect(res).to.eql(null);
7979
done();
8080
});
8181
});
@@ -95,8 +95,8 @@ describe("async-validate:", function() {
9595
var schema = new Schema(descriptor)
9696
, source = {performer: {type: 'Group', name: 'john'}};
9797
schema.validate(source, function(err, res){
98-
expect(err).to.be.null;
99-
expect(res).to.be.null;
98+
expect(err).to.eql(null);
99+
expect(res).to.eql(null);
100100
done();
101101
});
102102
});
@@ -105,7 +105,7 @@ describe("async-validate:", function() {
105105
var schema = new Schema(descriptor)
106106
, source = {performer: {type: 'Unknown', name: 'joe'}};
107107
function fn() {
108-
schema.validate(source, function(err, res){});
108+
schema.validate(source, function(/*err, res*/){});
109109
}
110110
expect(fn).throws(/Unknown performer type/i);
111111
done();
@@ -120,8 +120,8 @@ describe("async-validate:", function() {
120120
]
121121
};
122122
schema.validate(source, function(err, res){
123-
expect(err).to.be.null;
124-
expect(res).to.be.null;
123+
expect(err).to.eql(null);
124+
expect(res).to.eql(null);
125125
done();
126126
});
127127
});

test/spec/string.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,6 @@ describe('async-validate:', function() {
1919
});
2020
});
2121

22-
//it('should error on required string field (null)', function(done) {
23-
//var descriptor = {
24-
//type: 'object',
25-
//fields: {
26-
//name: {type: 'string', required: true}
27-
//}
28-
//}
29-
//var schema = new Schema(descriptor);
30-
//schema.validate({name: null}, function(err, res) {
31-
//expect(res.errors.length).to.eql(2);
32-
//expect(res.fields.name.length).to.eql(2);
33-
//expect(res.errors[0].message).to.eql('name is required');
34-
//done();
35-
//});
36-
//});
37-
3822
it('should error on non-string type', function(done) {
3923
var descriptor = {
4024
type: 'object',

0 commit comments

Comments
 (0)