Commit 69c4f1e
authored
Main's post-merge lane is red on its ESLint step, and two unit tests in the
same area fail next to it. Both trace to #10929, which made Enter resolve a
`/`-prefixed buffer against the live command list instead of the
render-derived completion that can still describe the previous keystroke.
The keypress callback that reads that list never added it to its
dependencies, so `react-hooks/exhaustive-deps` reports a missing
`slashCommands` and the lane's `--max-warnings 0` turns the single warning
into a failed step. The omission is also the very staleness the commit set
out to remove: a handler captured against an older list resolves the live
command from stale data.
The same commit exposed a fixture that never matched production. The test
command list declared `memory` with subcommands but no action, while the
real command is runnable, and the hook both the old and the new path
consult requires an action before it calls a match perfect. Two tests
therefore mocked a perfect match for a buffer the live list called
unrunnable — a state the real hook cannot produce — and Enter stopped
submitting. Giving the fixture the action the real command has restores
both with their assertions untouched; a third test sharing the fixture had
been passing only because the perfect-match branch was dead for that
buffer, and now exercises the path it was written for.
1 parent b559525 commit 69c4f1e
2 files changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1893 | 1893 | | |
1894 | 1894 | | |
1895 | 1895 | | |
| 1896 | + | |
1896 | 1897 | | |
1897 | 1898 | | |
1898 | 1899 | | |
| |||
0 commit comments