test(editor): stabilize dirty render measurement
This commit is contained in:
parent
373a05b265
commit
a0ca8bf89c
1 changed files with 3 additions and 4 deletions
|
|
@ -38,12 +38,11 @@ final class EditorLargeDocumentValidationTests: XCTestCase {
|
|||
previousActiveLineIndex: activeLineIndex,
|
||||
currentActiveLineIndex: activeLineIndex
|
||||
)
|
||||
let updatedLineIndex = DocumentLineIndex(source: updatedSource)
|
||||
let dirtyRenderMeasurement = elapsedTime {
|
||||
let lines = EditorActiveLineTracker.lines(from: updatedSource, activeLineIndex: activeLineIndex)
|
||||
let dirty = Set(plan.dirtyLineIndexes)
|
||||
let renderer = HybridMarkdownLineRenderer()
|
||||
_ = lines
|
||||
.filter { dirty.contains($0.index) }
|
||||
_ = plan.dirtyLineIndexes
|
||||
.compactMap { updatedLineIndex.editorLine(at: $0, activeLineIndex: activeLineIndex) }
|
||||
.map(renderer.renderPlan(for:))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue