Skip to main content
Module

x/rambda/endsWith.spec.js

Faster and smaller alternative to Ramda
Go to Latest
File
import { endsWith } from './endsWith'
test('happy', () => { expect(endsWith('bar', 'foo-bar')).toBeTrue() expect(endsWith('baz')('foo-bar')).toBeFalse()})
test('does not work with arrays', () => { expect(() => endsWith([ 'c' ], [ 'a', 'b', 'c' ])).toThrowWithMessage(Error, 'str.endsWith is not a function')})