Open vadimdemedes opened 3 years ago
Ink's tests for keyboard input could be stricter by checking all properties of key object in useInput hook. Currently they look like this - https://github.com/vadimdemedes/ink/blob/master/test/fixtures/use-input.tsx.
key
useInput
Here's an example change for Escape key:
- if (test === 'escape' && key.escape) { + if (test === 'escape' && equals(key, { + escape: true, + leftArrow: false, + rightArrow: false, + upArrow: false, + downArrow: false, + // ... other `key` properties should be `false` too }))
Ink's tests for keyboard input could be stricter by checking all properties of
key
object inuseInput
hook. Currently they look like this - https://github.com/vadimdemedes/ink/blob/master/test/fixtures/use-input.tsx.Here's an example change for Escape key: