Last active
March 6, 2017 17:22
-
-
Save garbles/a0d0cdd08b134d00b3bc9dc581f336b8 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 setName from './setName'; | |
import {types} from 'babel-plugin-transform-flow-to-gen/api'; | |
import type {Person} from './types'; | |
require('jasmine-check').install(); | |
describe('setName', () => { | |
it.check('sets a new name', [Person(), types.string()], (person, newName) => { | |
const next = setName(person, newName); | |
expect(next.name).toEqual(newName); | |
expect(person).not.toBe(next); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment