HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/shop.komma.nl/node_modules/cardinal/test/themes.js
'use strict'
/* jshint asi: true */

var test     =  require('tape')
var path     =  require('path')
var fs       =  require('fs')
var themesdir = path.join(__dirname, '..', 'themes')
var allFiles = fs.readdirSync(themesdir)

test('validate themes by requiring all of them', function(t) {
  allFiles
    .filter(function(file) { return path.extname(file) === '.js' })
    .forEach(function(theme) {
      try {
        t.ok(require(path.join(themesdir, theme)), theme + ' is valid')
      } catch (e) {
        t.fail('theme: ' + theme + ' is invalid! ' + e.message)
      }
    })
  t.end()
})