Skip to content

Instantly share code, notes, and snippets.

@kantord
Created June 11, 2018 19:31
Show Gist options
  • Save kantord/c34819642af9efe375b13c32b894acdc to your computer and use it in GitHub Desktop.
Save kantord/c34819642af9efe375b13c32b894acdc to your computer and use it in GitHub Desktop.
milestone0.js
// @flow
type Environment = {
+left: ?number,
+right: ?number,
};
describe(
'Min',
Suite.Function(
(_: Specimen) => ({
[_(it)]: (environment: Environment) => require('./Min'),
...({left, right}: Environment, expected) => ({
result: Min => expect(Min(left, right)).toEqual(expected.result),
}),
}),
(_: Experiment) =>
_.with({
left: 4,
right: 6,
}).produces({result: 4}),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment