Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
3
test/hasFlags/hasFlags.js
Normal file
3
test/hasFlags/hasFlags.js
Normal file
@ -0,0 +1,3 @@
|
||||
const hasFlags = (...flags) =>
|
||||
flags.every(flag => process.argv.includes(/^-{1,2}/.test(flag) ? flag : '--' + flag));
|
||||
module.exports = hasFlags;
|
||||
Reference in New Issue
Block a user