diff --git a/gulpfile.js b/gulpfile.js index 371cdcb..f272484 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -43,6 +43,8 @@ gulp.task('pre-test', function () { gulp.task('test', ['pre-test'], function (cb) { var mochaErr; + console.log('Running tests with node version', process.version); + gulp.src('test/**/*.js') .pipe(plumber()) .pipe(mocha({ reporter: 'spec' })) @@ -62,6 +64,7 @@ gulp.task('watch', function () { gulp.task('coveralls', ['test'], function () { if (!process.env.CI) { + console.log('ignoring coveralls report generation.'); return; } diff --git a/lib/rest/utils.js b/lib/rest/utils.js index 81f4cf3..27a9bf7 100644 --- a/lib/rest/utils.js +++ b/lib/rest/utils.js @@ -22,7 +22,17 @@ export function camelCaseRequestWrapper(requestFunc) { return (method, action, params) => { params = recursivelyRenameObject(params, function (value, key) { - if(typeof key !== 'string') return key; + if (typeof key !== 'string') return key; + + // Snake Case logic has issue, it replaces double underscores with single + // So dont run snake case logic for following params + let skipParamsFromSnakeCasing = [ + 'message_time__lt', 'message_time__lte', + 'message_time__gt', 'message_time__gte', + ] + if (skipParamsFromSnakeCasing.indexOf(key) >= 0) { + return key; + } return _snakeCase(key) .replace('_less_than', '__lt') @@ -35,7 +45,7 @@ export function camelCaseRequestWrapper(requestFunc) { return requestFunc(method, action, params).then(res => { res.body = recursivelyRenameObject(res.body, function (value, key) { - if(typeof key !== 'string') return key; + if (typeof key !== 'string') return key; return _camelCase(key); }); diff --git a/package.json b/package.json index a261e99..b0935d0 100644 --- a/package.json +++ b/package.json @@ -66,4 +66,4 @@ "uri-parser": "^1.0.0", "utf8": "^2.1.2" } -} +} \ No newline at end of file