test-hooks
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

TEST-HOOKS

styled with prettier Travis Coverage Status dependencies Status

Usage

  import testHooks from 'test-hooks'
  const { act, hooks } = testHooks(() => useState(true));
  expect(hooks()[0]).toEqual(true);
  act(hook => {
    hook[1](false);
  });
  expect(hooks()[0]).toEqual(false);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.3
    1
    • latest

Version History

Package Sidebar

Install

npm i test-hooks

Weekly Downloads

4

Version

1.1.3

License

MIT

Unpacked Size

7.56 kB

Total Files

6

Last publish

Collaborators

  • raohai