UNPKG

e-lado

Version:

[![CircleCI](https://circleci.com/gh/sharetribe/sharetribe/tree/master.svg?style=svg)](https://circleci.com/gh/sharetribe/sharetribe/tree/master) [![Dependency Status](https://gemnasium.com/sharetribe/sharetribe.png)](https://gemnasium.com/sharetribe/shar

23 lines (19 loc) 608 B
'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() })