deal with no-prototype-builtins
This commit is contained in:
parent
fddb531ed2
commit
fc18673030
6 changed files with 12 additions and 6 deletions
|
|
@ -19,6 +19,7 @@ describe('routes', () => {
|
|||
|
||||
const matchedComponents = router.currentRoute.value.matched
|
||||
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
expect(matchedComponents[0].components.default.components.hasOwnProperty('Timeline')).to.eql(true)
|
||||
})
|
||||
|
||||
|
|
@ -27,6 +28,7 @@ describe('routes', () => {
|
|||
|
||||
const matchedComponents = router.currentRoute.value.matched
|
||||
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
expect(matchedComponents[0].components.default.components.hasOwnProperty('UserCard')).to.eql(true)
|
||||
})
|
||||
|
||||
|
|
@ -35,6 +37,7 @@ describe('routes', () => {
|
|||
|
||||
const matchedComponents = router.currentRoute.value.matched
|
||||
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
expect(matchedComponents[0].components.default.components.hasOwnProperty('UserCard')).to.eql(true)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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