--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
22
node_modules/cardinal/test/themes.js
generated
vendored
Normal file
22
node_modules/cardinal/test/themes.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
/*jshint asi: true*/
|
||||
|
||||
var test = require('tap').test
|
||||
, path = require('path')
|
||||
, fs = require('fs')
|
||||
, themesdir = path.join(__dirname, '..', 'themes')
|
||||
, 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()
|
||||
})
|
||||
|
||||
Loading…
Reference in a new issue