Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pressKey: async (key) => {
const el = await elem();
const def = getDefinitionForKeyType(key);
await fireEvent.keyDown(el, def);
await fireEvent.keyUp(el, def);
},
hasClass: async (className: string) => (await elem()).classList.contains(className),