moy-fp
Version:
A functional programming library.
18 lines (15 loc) • 342 B
JavaScript
import __ from '../../src/Function/__'
/**
* String -> String -> [String]
*/
import split from '../../src/String/split'
test('split(not using __)', () => {
expect(
split(',')('1,2,3,4')
).toEqual(['1', '2', '3', '4'])
})
test('split(using __)', () => {
expect(
split(__, '1,2,3,4')(',')
).toEqual(['1', '2', '3', '4'])
})