Manually define JupyterServerInstallation execOptions field in notebook unit tests. (#6292)

This commit is contained in:
Cory Rivera
2019-07-09 09:47:45 -07:00
committed by GitHub
parent dac3075fdd
commit b1cc95d0f9
2 changed files with 2 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ describe('Jupyter server instance', function (): void {
mockOutputChannel = TypeMoq.Mock.ofType(MockOutputChannel);
mockInstall.setup(i => i.outputChannel).returns(() => mockOutputChannel.object);
mockInstall.setup(i => i.pythonExecutable).returns(() => 'python3');
mockInstall.object.execOptions = { env: Object.assign({}, process.env) };
mockUtils = TypeMoq.Mock.ofType(ServerInstanceUtils);
mockUtils.setup(u => u.ensureProcessEnded(TypeMoq.It.isAny())).returns(() => undefined);
serverInstance = new PerNotebookServerInstance({

View File

@@ -34,6 +34,7 @@ describe('Local Jupyter Server Manager', function (): void {
deferredInstall = new Deferred<void>();
let mockInstall = TypeMoq.Mock.ofType(JupyterServerInstallation, undefined, undefined, '/root');
mockInstall.setup(j => j.promptForPythonInstall()).returns(() => deferredInstall.promise);
mockInstall.object.execOptions = { env: Object.assign({}, process.env) };
serverManager = new LocalJupyterServerManager({
documentPath: expectedPath,