mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 09:35:41 -05:00
Fix paths for tests (#13816)
This commit is contained in:
@@ -126,9 +126,10 @@ describe('PlatformService', () => {
|
||||
it('openFile', () => {
|
||||
const stub = sinon.stub(vscode.commands, 'executeCommand').resolves(); //resolves with a known string
|
||||
platformService.openFile(filePath);
|
||||
const expectedFilePath = vscode.Uri.file(filePath).fsPath;
|
||||
stub.callCount.should.equal(1);
|
||||
stub.getCall(0).args[0].should.equal('vscode.open');
|
||||
stub.getCall(0).args[1].path.should.equal(filePath);
|
||||
(stub.getCall(0).args[1] as vscode.Uri).fsPath.should.equal(expectedFilePath);
|
||||
});
|
||||
it('readTextFile', async () => {
|
||||
sinon.stub(fs.promises, 'readFile').resolves(contents);
|
||||
|
||||
Reference in New Issue
Block a user