Fix and enable core unit test coverage (#18781)

* Fix and enable core unit test coverage

* switch

* Fix coverage mapping

* don't output marked

* Fix filter check
This commit is contained in:
Charles Gagnon
2022-03-21 15:15:07 -07:00
committed by GitHub
parent 8a670a8baa
commit 08b2d9668e
7 changed files with 14 additions and 11 deletions

View File

@@ -964,7 +964,8 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
// Determine options
const openEditorOptions: IEditorOpenOptions = {
index: options ? options.index : undefined,
pinned: options?.sticky || !this.accessor.partOptions.enablePreview || editor.isDirty() || (options?.pinned ?? typeof options?.index === 'number' /* unless specified, prefer to pin when opening with index */) || (typeof options?.index === 'number' && this.model.isSticky(options.index)),
// {{SQL CARBON EDIT}} Refactor statement to not use ?? since that breaks code coverage on unit tests
pinned: options?.sticky || !this.accessor.partOptions.enablePreview || editor.isDirty() || (options?.pinned !== null ? options?.pinned : typeof options?.index === 'number' /* unless specified, prefer to pin when opening with index */) || (typeof options?.index === 'number' && this.model.isSticky(options.index)),
sticky: options?.sticky || (typeof options?.index === 'number' && this.model.isSticky(options.index)),
active: this.count === 0 || !options || !options.inactive
};