Skip to content

Commit 83e67cf

Browse files
Karan NagpalKaran Nagpal
authored andcommitted
change default when file not present
1 parent d8551bc commit 83e67cf

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

bin/helpers/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,6 @@ exports.fetchZipSize = (fileName) => {
10191019
return stats.size; // in bytes
10201020
}
10211021
catch(err) {
1022-
return "file not present"
1022+
return 0;
10231023
}
10241024
}

test/unit/bin/commands/runs.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,6 @@ describe("runs", () => {
845845
chai.assert.fail("Promise error");
846846
})
847847
.catch((error) => {
848-
console.log(error);
849848
sinon.assert.calledOnce(getConfigPathStub);
850849
sinon.assert.calledOnce(getConfigPathStub);
851850
sinon.assert.calledOnce(validateBstackJsonStub);

test/unit/bin/helpers/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2672,7 +2672,7 @@ describe('utils', () => {
26722672
});
26732673

26742674
it('handle file not present', () => {
2675-
expect(utils.fetchZipSize('unknown.tar.gz')).to.be.eql('file not present');
2675+
expect(utils.fetchZipSize('unknown.tar.gz')).to.be.eql(0);
26762676
});
26772677
});
26782678
});

0 commit comments

Comments
 (0)