Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Jun 21, 2024
1 parent fb1077e commit 25a26ee
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/test/providers/repl.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ suite('REPL Provider', () => {
let activeResourceService: TypeMoq.IMock<IActiveResourceService>;
let replProvider: ReplProvider;
let interpreterService: TypeMoq.IMock<IInterpreterService>;
const executionService = TypeMoq.Mock.ofType<ICodeExecutionService>();
setup(() => {
serviceContainer = TypeMoq.Mock.ofType<IServiceContainer>();
commandManager = TypeMoq.Mock.ofType<ICommandManager>();
Expand All @@ -36,12 +35,9 @@ suite('REPL Provider', () => {
activeResourceService = TypeMoq.Mock.ofType<IActiveResourceService>();
serviceContainer.setup((c) => c.get(ICommandManager)).returns(() => commandManager.object);
serviceContainer.setup((c) => c.get(IWorkspaceService)).returns(() => workspace.object);
// serviceContainer
// .setup((c) => c.get(ICodeExecutionService, TypeMoq.It.isValue('repl')))
// .returns(() => codeExecutionService.object);
serviceContainer
.setup((s) => s.get(TypeMoq.It.isValue(ICodeExecutionService), TypeMoq.It.isValue('standard')))
.returns(() => executionService.object);
.returns(() => codeExecutionService.object);
serviceContainer.setup((c) => c.get(IDocumentManager)).returns(() => documentManager.object);
serviceContainer.setup((c) => c.get(IActiveResourceService)).returns(() => activeResourceService.object);
interpreterService = TypeMoq.Mock.ofType<IInterpreterService>();
Expand Down Expand Up @@ -103,7 +99,7 @@ suite('REPL Provider', () => {
await commandHandler!.call(replProvider);

serviceContainer.verify(
(c) => c.get(TypeMoq.It.isValue(ICodeExecutionService), TypeMoq.It.isAny()),
(c) => c.get(TypeMoq.It.isValue(ICodeExecutionService), TypeMoq.It.isValue('standard')),
TypeMoq.Times.once(),
);
codeExecutionService.verify((c) => c.initializeRepl(TypeMoq.It.isValue(resource)), TypeMoq.Times.once());
Expand Down

0 comments on commit 25a26ee

Please sign in to comment.