Skip to content

Commit ce1a44b

Browse files
committed
linting happy
1 parent 91631e8 commit ce1a44b

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ class ServerlessStepFunctions {
111111
shortcut: 'd',
112112
},
113113
path: {
114-
usage: 'The path to a json file with input data to be passed to the invoked step function',
114+
usage:
115+
'The path to a json file with input data to be passed to the invoked step function',
115116
shortcut: 'p',
116117
},
117118
stage: {

index.test.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -408,33 +408,29 @@ describe('ServerlessStepFunctions', () => {
408408
});
409409

410410
describe('#parseInputdate()', () => {
411-
let fileExistsSyncStub;
412-
let readFileSyncStub;
413411
beforeEach(() => {
414412
serverlessStepFunctions.serverless.config.servicePath = 'servicePath';
415-
fileExistsSyncStub = sinon.stub(serverlessStepFunctions.serverless.utils, 'fileExistsSync')
416-
.returns(true);
417-
readFileSyncStub = sinon.stub(serverlessStepFunctions.serverless.utils, 'readFileSync')
413+
sinon.stub(serverlessStepFunctions.serverless.utils, 'fileExistsSync').returns(true);
414+
sinon.stub(serverlessStepFunctions.serverless.utils, 'readFileSync')
418415
.returns({ foo: 'var' });
419416
serverlessStepFunctions.options.data = null;
420417
serverlessStepFunctions.options.path = 'data.json';
421418
});
422419

423420
it('should throw error if file does not exists', () => {
424421
serverlessStepFunctions.serverless.utils.fileExistsSync.restore();
425-
fileExistsSyncStub = sinon.stub(serverlessStepFunctions.serverless.utils, 'fileExistsSync')
426-
.returns(false);
422+
sinon.stub(serverlessStepFunctions.serverless.utils, 'fileExistsSync').returns(false);
427423
expect(() => serverlessStepFunctions.parseInputdate()).to.throw(Error);
428424
serverlessStepFunctions.serverless.utils.readFileSync.restore();
429425
});
430426

431-
it('should parse file if path param is provided', () => {
432-
return serverlessStepFunctions.parseInputdate().then(() => {
427+
it('should parse file if path param is provided'
428+
, () => serverlessStepFunctions.parseInputdate().then(() => {
433429
expect(serverlessStepFunctions.options.data).to.deep.equal('{"foo":"var"}');
434430
serverlessStepFunctions.serverless.utils.fileExistsSync.restore();
435431
serverlessStepFunctions.serverless.utils.readFileSync.restore();
436-
});
437-
});
432+
})
433+
);
438434

439435
it('should return resolve if path param is not provided', () => {
440436
serverlessStepFunctions.options.path = null;

0 commit comments

Comments
 (0)