How to use the clipboard-copy.mockReset function in clipboard-copy

To help you get started, we’ve selected a few clipboard-copy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nexxtway / react-rainbow / src / components / Lookup / __test__ / selectedValue.spec.js View on Github external
it('should copy value label to clipboard when input gets focus', () => {
        copyFn.mockReset();
        const component = mount();
        component.find('input').simulate('focus');
        expect(copyFn).toHaveBeenCalledWith(value.label);
    });
});

clipboard-copy

Lightweight copy to clipboard for the web

MIT
Latest version published 4 years ago

Package Health Score

56 / 100
Full package analysis

Popular clipboard-copy functions