-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix tests in ds/custom_editor branch #10512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,4 @@ export function getOSType() { | |
} | ||
} | ||
|
||
export const UseCustomEditor = true; | ||
export const UseCustomEditor = { enabled: true }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we're supporting both custom and old editors. We need tests for both. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to support both? Once this ships we're not using the old way anymore. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import { expect } from 'chai'; | |
import { anything, instance, mock, when } from 'ts-mockito'; | ||
import * as typemoq from 'typemoq'; | ||
import { EventEmitter, Uri, WebviewPanel } from 'vscode'; | ||
import { ICustomEditorService, IWorkspaceService } from '../../../client/common/application/types'; | ||
import { CustomDocument, ICustomEditorService, IWorkspaceService } from '../../../client/common/application/types'; | ||
import { WorkspaceService } from '../../../client/common/application/workspace'; | ||
import { AsyncDisposableRegistry } from '../../../client/common/asyncDisposableRegistry'; | ||
import { ConfigurationService } from '../../../client/common/configuration/service'; | ||
|
@@ -65,10 +65,13 @@ suite('Data Science - Native Editor Provider', () => { | |
.returns((_a1, _a2, _a3) => { | ||
return { dispose: noop }; | ||
}); | ||
|
||
customEditorService | ||
.setup(c => c.openEditor(typemoq.It.isAny())) | ||
.returns(async f => { | ||
return registeredProvider.resolveCustomEditor(f, panel.object); | ||
const doc = typemoq.Mock.ofType<CustomDocument>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was broken |
||
doc.setup(d => d.uri).returns(() => f); | ||
return registeredProvider.resolveCustomEditor(doc.object, panel.object); | ||
}); | ||
|
||
editor | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored running tests against insiders.