deal with no-prototype-builtins
This commit is contained in:
parent
fddb531ed2
commit
fc18673030
6 changed files with 12 additions and 6 deletions
|
|
@ -6,7 +6,7 @@ const checkColors = (output) => {
|
|||
expect(v, key).to.be.an('object')
|
||||
expect(v, key).to.include.all.keys('r', 'g', 'b')
|
||||
'rgba'.split('').forEach(k => {
|
||||
if ((k === 'a' && v.hasOwnProperty('a')) || k !== 'a') {
|
||||
if ((k === 'a' && Object.prototype.hasOwnProperty.call(v, 'a')) || k !== 'a') {
|
||||
expect(v[k], key + '.' + k).to.be.a('number')
|
||||
expect(v[k], key + '.' + k).to.be.least(0)
|
||||
expect(v[k], key + '.' + k).to.be.most(k === 'a' ? 1 : 255)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue