philbooth · GitHub

Conversation

@philbooth

philbooth


it('write fails if percentage is greater than 100', () => {
return cp.execAsync('echo \'{"sendgrid":{"percentage":101,"regex":".*"}}\' | node scripts/email-config write', { cwd })
return cp.execAsync('echo \'{"sendgrid":{"percentage":100.1,"regex":".*"}}\' | node scripts/email-config write', { cwd })

shane-tomlinson

[ 'percentage', value => value >= 0 && value <= 100 ],
[ 'regex', value => value && typeof value === 'string' ]
[ 'regex', value =>
value && typeof value === 'string' && value.indexOf('"') === -1 && safeRegex(value)

@philbooth

@philbooth

philbooth deleted the pb/email-config-improvements branch

August 15, 2018 13:37

Labels

None yet

Read the original on github.com ↗