Skip to content

Commit

Permalink
Fixed some jslint identified issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvernagus committed Feb 10, 2013
1 parent b863265 commit 5ea7487
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
12 changes: 11 additions & 1 deletion grunt.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
var files = ['*.js', 'lib/**/*.js', 'test/**/*.js'];

module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-mocha-test');
grunt.initConfig({
lint: {
files: ['*.js', 'lib/**/*.js']
files: files
},
mochaTest: {
tests: ['test/**/*.js']
},
mochaTestConfig: {
tests: {

},
acceptanceTests: {

}
}
});
grunt.registerTask('default', 'lint mochaTest');
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"devDependencies": {
"grunt-mocha-test": "*",
"mocha": "~1.7.4",
"nock": "~0.14.3"
"nock": "~0.14.3",
"grunt": "~0.3.17"
},
"author": "Ray Vernagus",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions test/geoservices.converter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ describe('geoservices converter', function() {

it('should error upon empty geometry', function() {
this.esriFeature.geometry = {};
assert.throws((function() {
assert.throws(function() {
geoservices.convert.toGeoJSON(this.esriFeature);
}), Error);
}, Error);
});

it('should convert a point', function() {
Expand Down
8 changes: 3 additions & 5 deletions test/geoservices.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ var expectRequest = function(requestedPath, expectedPath, response, method, filt
};

var expectGetRequest = function(requestedPath, expectedPath, response, filter) {
if (filter == null) {
if (filter === undefined) {
filter = true;
}
return expectRequest(requestedPath, expectedPath, response, 'get', filter);
};

var expectPostRequest = function(requestedPath, expectedPath, response, filter) {
if (filter == null) {
if (filter === undefined) {
filter = true;
}
return expectRequest(requestedPath, expectedPath, response, 'post', filter);
Expand All @@ -40,9 +40,7 @@ var getUrlTest = function(requestedPath, expectedPath, filter) {
};

var postUrlTest = function(requestedPath, expectedPath, response, filter) {
if (response == null) {
response = '{}';
}
response = response || '{}';
return function(done) {
expectPostRequest(requestedPath, expectedPath, response, filter);
geoservices.post({
Expand Down

0 comments on commit 5ea7487

Please sign in to comment.