Skip to content

Commit 81e7694

Browse files
committed
chore: address final coderabbit comments
1 parent 23c6ea2 commit 81e7694

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

packages/ember-hotkeys/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<br />
66

77
<div align="center">
8-
<a href="https://www.npmjs.com/package/@tanstack/hotkeys" target="\_parent">
9-
<img alt="" src="https://img.shields.io/npm/dm/@tanstack/hotkeys.svg" alt="npm downloads" />
8+
<a href="https://www.npmjs.com/package/@tanstack/ember-hotkeys" target="\_parent">
9+
<img alt="" src="https://img.shields.io/npm/dm/@tanstack/ember-hotkeys.svg" alt="npm downloads" />
1010
</a>
1111
<a href="https://github.com/TanStack/hotkeys" target="\_parent">
1212
<img alt="" src="https://img.shields.io/github/stars/TanStack/hotkeys.svg?style=social&label=Star" alt="GitHub stars" />

packages/ember-hotkeys/src/test-support.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import type { Hotkey } from '@tanstack/hotkeys';
1212
* @example
1313
* ```ts
1414
* import { triggerKeyPress } from '@tanstack/ember-hotkeys/test-support';
15+
* import { settled } from '@ember/test-helpers';
1516
*
1617
* test('onSave is called when Mod+S is pressed', async function (assert) {
1718
* assert.expect(1);
@@ -22,6 +23,7 @@ import type { Hotkey } from '@tanstack/hotkeys';
2223
* </template>
2324
* );
2425
* triggerKeyPress('Mod+S');
26+
* await settled();
2527
* });
2628
* ```
2729
*/
@@ -50,11 +52,14 @@ export function triggerKeyPress(combo: Hotkey): void {
5052
* @example
5153
* ```ts
5254
* import { triggerKeyPress, triggerKeyRelease } from '@tanstack/ember-hotkeys/test-support';
55+
* import { settled } from '@ember/test-helpers';
5356
*
5457
* test('key hold detection', async function (assert) {
5558
* triggerKeyPress('Shift');
59+
* await settled();
5660
* // ... assert held state ...
5761
* triggerKeyRelease('Shift');
62+
* await settled();
5863
* });
5964
* ```
6065
*/

0 commit comments

Comments
 (0)