Skip to main content
Module

x/rambda/without.spec.js

Faster and smaller alternative to Ramda
Go to Latest
File
import { without } from './without'
test('should return a new list without values in the first argument ', () => { const itemsToOmit = [ 'A', 'B', 'C' ] const collection = [ 'A', 'B', 'C', 'D', 'E', 'F' ]
expect(without(itemsToOmit, collection)).toEqual([ 'D', 'E', 'F' ]) expect(without(itemsToOmit)(collection)).toEqual([ 'D', 'E', 'F' ])})
test('ramda bug', () => { expect( without("0:1", ["0", "0:1"]) ).toEqual(['0:1'])})
test('ramda test', () => { expect(without([ 1, 2 ])([ 1, 2, 1, 3, 4 ])).toEqual([ 3, 4 ])})