Skip to content

Commit

Permalink
chore: get rid of eslint warnings (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anemy authored Feb 8, 2023
1 parent 363587d commit 2ac309b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/telemetry/telemetryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ export default class TelemetryService {
this._context.extensionPath,
'./constants.json'
);
const constantsFile = fs.readFileSync(segmentKeyFileLocation).toString();
// eslint-disable-next-line no-sync
const constantsFile = fs.readFileSync(segmentKeyFileLocation, 'utf8');
const constants = JSON.parse(constantsFile) as { segmentKey: string };

log.info('TELEMETRY key received', typeof constants.segmentKey);
Expand Down
4 changes: 2 additions & 2 deletions src/test/suite/language/languageServerController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ suite('Language Server Controller Test Suite', () => {
expect(testLanguageServerController._isExecutingInProgress).to.equal(false);
});

test('the language server dependency bundle exists', () => {
test('the language server dependency bundle exists', async () => {
const extensionPath = mdbTestExtension.testExtensionContext.extensionPath;
const languageServerModuleBundlePath = path.join(
extensionPath,
'dist',
'languageServer.js'
);
expect(fs.existsSync(languageServerModuleBundlePath)).to.equal(true);
await fs.promises.stat(languageServerModuleBundlePath);
});
});
4 changes: 2 additions & 2 deletions src/test/suite/language/mongoDBService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ suite('MongoDBService Test Suite', () => {
},
};

test('the language server worker dependency bundle exists', () => {
test('the language server worker dependency bundle exists', async () => {
const languageServerModuleBundlePath = path.join(
mdbTestExtension.testExtensionContext.extensionPath,
'dist',
languageServerWorkerFileName
);
expect(fs.existsSync(languageServerModuleBundlePath)).to.equal(true);
await fs.promises.stat(languageServerModuleBundlePath);
});

suite('Extension path', () => {
Expand Down

0 comments on commit 2ac309b

Please sign in to comment.