Skip to main content
Module

x/rambda/source/test.spec.js

Faster and smaller alternative to Ramda
Latest
File
import { test as testMethod } from './test.js'
test('happy', () => { expect(testMethod(/^x/, 'xyz')).toBeTrue()
expect(testMethod(/^y/)('xyz')).toBeFalse()})
test('throws if first argument is not regex', () => { expect(() => testMethod('foo', 'bar')).toThrowErrorMatchingInlineSnapshot('"R.test requires a value of type RegExp as its first argument; received "foo""')})