Skip to content

Commit 4f9da6a

Browse files
fix codeql tasks
1 parent a9b20eb commit 4f9da6a

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

lib/api.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ class TestingBot {
2222
_loadConfig () {
2323
try {
2424
const tbFile = path.join(os.homedir(), '.testingbot');
25-
if (fs.statSync(tbFile).isFile() === true) {
26-
const data = fs.readFileSync(tbFile);
27-
if (data !== null) {
28-
const arr = data.toString().replace('\n', '').split(':');
29-
this.options.api_key = arr[0];
30-
this.options.api_secret = arr[1];
31-
}
25+
const data = fs.readFileSync(tbFile);
26+
if (data !== null) {
27+
const arr = data.toString().replace('\n', '').split(':');
28+
this.options.api_key = arr[0];
29+
this.options.api_secret = arr[1];
3230
}
3331
} catch (e) {
3432
}

test/api_test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ describe('TestingBot API Tests', function() {
9595
});
9696

9797
it('should update a test with legacy data format', function(done) {
98-
const that = this;
9998
this.api.getTests((err, response) => {
10099
assert.ok(response && response.data && response.data.length > 0, 'Should have test data');
101100
const singleTest = response.data[0];
@@ -113,7 +112,6 @@ describe('TestingBot API Tests', function() {
113112
});
114113

115114
it('should update a test with object data format', function(done) {
116-
const that = this;
117115
this.api.getTests((err, response) => {
118116
assert.ok(response && response.data && response.data.length > 0, 'Should have test data');
119117
const singleTest = response.data[0];

0 commit comments

Comments
 (0)