Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,6 @@ function stepAt(clientY: number, frameDeltaMs = ONE_FRAME_MS): number {
}

describe('getDragAutoScrollStepPx', () => {
it('stays still while the pointer is away from both edges', () => {
expect(stepAt(300)).toBe(0)
expect(stepAt(130)).toBe(0)
expect(stepAt(470)).toBe(0)
})

it('pulls down past the bottom edge and up past the top edge', () => {
expect(stepAt(490)).toBeGreaterThan(0)
expect(stepAt(110)).toBeLessThan(0)
})

it('pulls harder the further past the edge the pointer is', () => {
expect(stepAt(600)).toBeGreaterThan(stepAt(490))
})

it('caps the pull however far past the edge the pointer goes', () => {
expect(stepAt(5000)).toBe(stepAt(100_000))
})

it('covers the same distance per millisecond at any refresh rate', () => {
expect(stepAt(600, ONE_FRAME_MS / 2) * 2).toBeCloseTo(stepAt(600, ONE_FRAME_MS), 8)
})
Expand Down
12 changes: 0 additions & 12 deletions src/renderer/src/components/editor/editor-saved-event-view.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,11 @@ function tab(id: string): OpenFile {
}

describe('editorSavedEventView', () => {
it('is the saving view while it is open', () => {
const files = [tab('other'), tab('saver')]
expect(
editorSavedEventView(files, { fileId: 'saver', recordViewIds: ['other', 'saver'] })?.id
).toBe('saver')
})

it("falls back to the record's other views when the saving view closed mid-write", () => {
const files = [tab('unrelated'), tab('other')]
expect(
editorSavedEventView(files, { fileId: 'closed', recordViewIds: ['closed', 'other'] })?.id
).toBe('other')
expect(editorSavedEventView(files, { fileId: 'closed' })).toBeUndefined()
})

it('ignores malformed details', () => {
expect(editorSavedEventView([tab('a')], null)).toBeUndefined()
expect(editorSavedEventView([tab('a')], { content: 'x' })).toBeUndefined()
})
})
55 changes: 0 additions & 55 deletions src/renderer/src/components/editor/monaco-reveal-range.test.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/renderer/src/components/linear-issue-text-save-plan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,4 @@ describe('getLinearIssueTextSavePlan', () => {

expect(plan).toEqual({ kind: 'changed', patch: { description: 'Updated details' } })
})

it('preserves the required-title guard', () => {
const plan = getLinearIssueTextSavePlan({
descriptionDraft: 'Details',
field: 'title',
issue: { title: 'Issue title', description: 'Details' },
titleDraft: ' '
})

expect(plan).toEqual({ kind: 'empty-title' })
})
})

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

45 changes: 0 additions & 45 deletions src/renderer/src/components/sparse/sparse-directory-browse.test.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { describe, expect, it } from 'vitest'
import {
addSparseDirectoryEntries,
parseSparseDirectoryEntryInput
} from './sparse-directory-entry-input'
import { parseSparseDirectoryEntryInput } from './sparse-directory-entry-input'

describe('parseSparseDirectoryEntryInput', () => {
it('normalizes a single typed path', () => {
Expand All @@ -26,12 +23,3 @@ describe('parseSparseDirectoryEntryInput', () => {
expect(parseSparseDirectoryEntryInput('.').error).toBeTruthy()
})
})

describe('addSparseDirectoryEntries', () => {
it('appends only new entries and preserves order', () => {
expect(addSparseDirectoryEntries(['apps/web'], ['apps/web', 'packages/ui'])).toEqual([
'apps/web',
'packages/ui'
])
})
})
Loading
Loading