Skip to content

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Jul 30, 2024
1 parent 190ea99 commit 4bd3d8d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/LanguageServerManager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,17 @@ describe('LanguageServerManager', () => {
});

it('reuses the same bsc version when already exists', async () => {
let stub = sinon.stub(childProcess, 'exec');
let spy = sinon.spy(childProcess, 'exec');
fsExtra.ensureDirSync(
s`${storageDir}/packages/brighterscript-0.65.0/node_modules/brighterscript/dist/index.js`
);
expect(
await languageServerManager['ensureBscVersionInstalled']('0.65.0')
).to.eql(s`${storageDir}/packages/brighterscript-0.65.0/node_modules/brighterscript`);
expect(
fsExtra.pathExistsSync(s`${storageDir}/packages/brighterscript-0.65.0/node_modules/brighterscript`)
).to.be.true;
expect(stub.called).to.be.false;
expect(spy.called).to.be.false;
});

it('repairs a broken bsc version', async () => {
Expand Down

0 comments on commit 4bd3d8d

Please sign in to comment.