UNPKG

@gnus.ai/upgrade-safe-transpiler-diamond

Version:

Solidity preprocessor used to generate OpenZeppelin Contracts Upgrade Safe using Diamond Pattern (EIP-2535).

22 lines (16 loc) 450 B
import test from 'ava'; import { matcher } from './matcher'; test('no patterns', t => { t.is(matcher([])('a'), undefined); }); test('no negative patterns', t => { t.true(matcher(['a*'])('a')); t.is(matcher(['b*'])('a'), undefined); }); test('excluded by a negative pattern', t => { t.false(matcher(['a*', '!a'])('a')); }); test('no positive patterns', t => { t.false(matcher(['!a'])('a')); t.is(matcher(['!b'])('a'), undefined); });