Skip to content

Commit

Permalink
fix(tests.themes): replace double negation to or logical expression
Browse files Browse the repository at this point in the history
  • Loading branch information
BeyondMagic committed Nov 5, 2024
1 parent 0acef97 commit e083686
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/themes.check.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const themes = require('../themes.json')

let allBugs = []
const allBugs = []

themes.forEach((entry, index) => {

let currentBugs = []
const currentBugs = []

const keys = Object.keys(entry)
const objectKeys = keys[0] !== 'title' ||
Expand All @@ -17,7 +17,7 @@ themes.forEach((entry, index) => {
typeof entry[keys[1]] !== 'string' ||
typeof entry[keys[2]] !== 'string' ||
typeof entry[keys[3]] !== 'string' ||
typeof entry[keys[4]] !== 'object' !!
typeof entry[keys[4]] !== 'object' ||
typeof entry[keys[5]] !== 'string'

if (typeof entry !== 'object') currentBugs.push('This theme is not an object.')
Expand Down

0 comments on commit e083686

Please sign in to comment.