moy-fp
Version:
A functional programming library.
18 lines (15 loc) • 372 B
JavaScript
import __ from '../../src/Function/__'
/**
* {k: v} -> [[k, v]]
*/
import toPairs from '../../src/Object/toPairs'
test('toPairs(not using __)', () => {
expect(
toPairs({a: 1, b: 2, c: 3})
).toEqual([['a', 1], ['b', 2], ['c', 3]])
})
test('toPairs(using __)', () => {
expect(
toPairs(__)({a: 1, b: 2, c: 3})
).toEqual([['a', 1], ['b', 2], ['c', 3]])
})