File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" />
Original file line number Diff line number Diff 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 */
You can’t perform that action at this time.
0 commit comments