Skip to main content
Module

x/rambda/prepend.spec.js

Faster and smaller alternative to Ramda
Go to Latest
File
import { prepend } from './prepend'
test('happy', () => { expect(prepend('yes', [ 'foo', 'bar', 'baz' ])).toEqual([ 'yes', 'foo', 'bar', 'baz', ])})
test('with empty list', () => { expect(prepend('foo')([])).toEqual([ 'foo' ])})
test('with string instead of array', () => { expect(prepend('foo')('bar')).toEqual([ 'foo', 'b', 'a', 'r' ])})