UNPKG

moy-fp

Version:
54 lines (45 loc) 949 B
import __ from '../../src/Function/__' /** * RegExp -> String -> Boolean */ import test from '../../src/String/test' it('test(not using __), without any flag', () => { expect( test(/a/)('murakami') ).toBeTruthy() }) it('test(not using __), with flag g', () => { expect( test(/y/g)('murakami') ).toBeFalsy() }) it('test(not using __), with flag i', () => { expect( test(/A/i)('murakami') ).toBeTruthy() }) it('test(not using __), with flag m', () => { expect( test(/a/m)('murakami') ).toBeTruthy() }) it('test(not using __), with flag y', () => { expect( test(/a/y)('murakami') ).toBeFalsy() }) it('test(not using __), with flag u', () => { expect( test(/\u{61}/u)('a') ).toBeTruthy() }) it('test(not using __), with flag s', () => { expect( test(/./s)('\n') ).toBeTruthy() }) it('test(using __), without any flag', () => { expect( test(__, 'murakami')(/a/) ).toBeTruthy() })