test sweep: kernel commands + widgets coverage, ratchet floor to 93

Add tests for `keybindings.dart` (KeyEvent → Keybinding mapping,
parse-error edges, resolver entries view), `toolchain_paths.dart`
(the Flutter-free `ToolchainView.resolved` static view), and several
`widgets/src/` primitives: tooltip hover/overlay, palette filter +
submit, multitab controller `copyWith` + size getters, and additional
markdown branches (h3–h6 headings, tables, strikethrough, default
block fallback, record-link tap).

Unfreezes the pre-push coverage floor that was held at 90 on
2026-05-14 by mistake and ratchets to 93. Tidies eight test files
that had accumulated unused imports flagged by `unnecessary_import`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-17 20:20:37 +02:00
co-authored by Claude Opus 4.7
parent 9030e564e5
commit e430a87569
18 changed files with 557 additions and 12 deletions
@@ -162,5 +162,47 @@ void main() {
c.remove('b');
expect(calls, 4);
});
test('length / isEmpty / isNotEmpty mirror the entries list', () {
final c = MultitabController<String>();
expect(c.length, 0);
expect(c.isEmpty, isTrue);
expect(c.isNotEmpty, isFalse);
c.add(entry('a'));
expect(c.length, 1);
expect(c.isEmpty, isFalse);
expect(c.isNotEmpty, isTrue);
});
});
group('MultitabEntry.copyWith', () {
test('overrides each field independently and keeps id', () {
const base = MultitabEntry<int>(id: 'x', title: 't', payload: 1);
final renamed = base.copyWith(title: 'T');
expect(renamed.id, 'x');
expect(renamed.title, 'T');
expect(renamed.payload, 1);
expect(renamed.closeable, isTrue);
expect(renamed.reorderable, isTrue);
final repayloaded = base.copyWith(payload: 99);
expect(repayloaded.payload, 99);
final pinned = base.copyWith(closeable: false, reorderable: false);
expect(pinned.closeable, isFalse);
expect(pinned.reorderable, isFalse);
});
test('omitting all overrides yields an equivalent entry', () {
const base = MultitabEntry<String>(id: 'a', title: 'A', payload: 'p');
final clone = base.copyWith();
expect(clone.id, base.id);
expect(clone.title, base.title);
expect(clone.payload, base.payload);
expect(clone.closeable, base.closeable);
expect(clone.reorderable, base.reorderable);
});
});
}