Last active
March 10, 2017 20:03
-
-
Save garbles/101d59455d112ada7e5c3de54b2da4a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {sampleOne} from 'babel-plugin-transform-flow-to-gen/api'; | |
type Person = { | |
name: string, | |
age: number, | |
setName: (name: string) => Person | |
}; | |
const person = sampleOne(Person()); | |
person.setName('hello'); | |
expect(person.setName).toHaveBeenCalledWith('hello'); | |
// true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment