NullVoxPopuli/react-state-helpers

View on GitHub
tests/withValue.test.js

Summary

Maintainability
A
0 mins
Test Coverage
import expect from 'expect';
import { withValue } from '../src/index';

describe('withValue', () => {
  it('takes a function', () => {
    const result = withValue(val => val * 2)({ target: { value: 4 }})

    expect(result).toEqual(8);
  });
});