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);

/test-hooks/

    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