Skip to content

Commit

Permalink
Add eqeqeq to .jshintrc; drop unused parameters in sendVpcFlow and se…
Browse files Browse the repository at this point in the history
…ndAicspmsgs
  • Loading branch information
mtrybulec committed Dec 18, 2018
1 parent 5186ab3 commit e4df00d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"eqeqeq": true,
"esversion": 6,
"mocha": true,
"node": true
Expand Down
4 changes: 2 additions & 2 deletions al_servicec.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class IngestC extends AlServiceC {
return this.post(`/data/secmsgs`, payload);
}

sendVpcFlow(data, invokedBy) {
sendVpcFlow(data) {
'use strict';
let payload = {
json : false,
Expand All @@ -193,7 +193,7 @@ class IngestC extends AlServiceC {
return this.post(`/data/vpcflow`, payload);
}

sendAicspmsgs(data, invokedBy) {
sendAicspmsgs(data) {
'use strict';
let payload = {
json : false,
Expand Down
6 changes: 3 additions & 3 deletions test/aimsc_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ describe('Unit Tests', function() {

fakeRest = sinon.stub(RestServiceClient.prototype, 'post').callsFake(
function fakeFn(path, options) {
if (path == '/aims/v1/authenticate' &&
options.auth.user == m_alMock.AIMS_AUTH.auth.user &&
options.auth.password == m_alMock.AIMS_AUTH.auth.password) {
if (path === '/aims/v1/authenticate' &&
options.auth.user === m_alMock.AIMS_AUTH.auth.user &&
options.auth.password === m_alMock.AIMS_AUTH.auth.password) {
return new Promise(function(resolve, reject) {
resolve(m_alMock.gen_auth_response());
});
Expand Down
2 changes: 1 addition & 1 deletion test/al_log_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('Unit Tests', function() {
};
var expectedPayload = 'eJzjamHi4izOLy1KTtXNTBGK5mLPyC8uATFFdm6e97ZBfLqW665Nbkkbdic+E771WoJByYJLhosvJz85MScepDQvMTdViEuKozg/NxXE5pLg4gSJx5dUFqQKcUtxJlaVFqXGp5XmSfkIHtV4Hc0ABLLcQEKJO9/YzLQ8NSkjPz/biCM3tbg4MT3V0Io/qzg/Tx+sTQ+kwknEEcR2TC7JLEt1ySxKTS7JL6okzjQjIk0DAFuCVYc=';
alLog.buildPayload('host-id', 'source-id', hml, msgs, parseFun, function(err, payload){
assert.equal(expectedPayload, new Buffer(payload).toString('base64'));
assert.equal(expectedPayload, payload.toString('base64'));
return done();
});
});
Expand Down
6 changes: 3 additions & 3 deletions test/alservicec_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ describe('Unit Tests', function() {
fakeAims = sinon.stub(RestServiceClient.prototype, 'post');
fakeAims.callsFake(
function fakeFn(path, options) {
if (path == '/aims/v1/authenticate' &&
options.auth.user == m_alMock.AIMS_AUTH.auth.user &&
options.auth.password == m_alMock.AIMS_AUTH.auth.password) {
if (path === '/aims/v1/authenticate' &&
options.auth.user === m_alMock.AIMS_AUTH.auth.user &&
options.auth.password === m_alMock.AIMS_AUTH.auth.password) {
return new Promise(function(resolve, reject) {
resolve(m_alMock.gen_auth_response());
});
Expand Down
4 changes: 2 additions & 2 deletions test/request_retry_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('HTTP request retry tests', function() {
.post('/aims/v1/authenticate')
.reply(201, m_alMock.AIMS_RESPONSE_200);
var customRetry = function(resp) {
if (resp.retryCode == customRetryCode) {
if (resp.retryCode === customRetryCode) {
return true;
} else {
return false;
Expand Down Expand Up @@ -177,7 +177,7 @@ describe('HTTP request retry tests', function() {
.post('/aims/v1/authenticate')
.reply(201, m_alMock.AIMS_RESPONSE_200);
var customRetry = function(resp) {
if (resp.error.customError == customRetryCode) {
if (resp.error.customError === customRetryCode) {
return false;
} else {
return true;
Expand Down

0 comments on commit e4df00d

Please sign in to comment.