Ava: t.notRegex

Created on 25 May 2016  路  7Comments  路  Source: avajs/ava

Using t.false(/regex/.test(str)) feels inconsistent.

Most helpful comment

Not released yet, any release incoming soon?

All 7 comments

I agree. It's weird it's the only one we don't offer a negation for.

Good point, although notRegex reads like not a regex in my mind.

Hmm. Yeah. That's not great, but I don't think it will confuse many people.

I think if we just enforce the string argument and provide a helpful error message, that will suffice. The few that are confused won't remain so long.

Wow, that was fast 馃帀

Not released yet, any release incoming soon?

Wait for release too

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kkemple picture kkemple  路  36Comments

jamestalmage picture jamestalmage  路  33Comments

novemberborn picture novemberborn  路  29Comments

sindresorhus picture sindresorhus  路  28Comments

Awk34 picture Awk34  路  46Comments