deno.land / x / rambda@v9.1.1 / source / test.spec.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
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""')})
rambda

Version Info

Tagged at
2 months ago