2015-12-09 10:41:04 +00:00
|
|
|
|
2015-12-29 11:35:55 +00:00
|
|
|
var SPAWNWATCHER = require('../src/core/spawn-watch')
|
|
|
|
, chai = require('chai')
|
2015-12-09 10:41:04 +00:00
|
|
|
, expect = chai.expect
|
|
|
|
, should = chai.should()
|
|
|
|
, path = require('path')
|
|
|
|
, _ = require('underscore')
|
|
|
|
, FRESHResume = require('../src/core/fresh-resume')
|
2015-12-19 17:37:42 +00:00
|
|
|
, FCMD = require( '../src/hackmycmd')
|
2015-12-09 10:41:04 +00:00
|
|
|
, validator = require('is-my-json-valid')
|
|
|
|
, COLORS = require('colors');
|
|
|
|
|
|
|
|
chai.config.includeStack = false;
|
|
|
|
|
|
|
|
describe('Testing themes', function () {
|
|
|
|
|
|
|
|
var _sheet;
|
|
|
|
|
|
|
|
COLORS.setTheme({
|
|
|
|
title: ['white','bold'],
|
|
|
|
info: process.platform === 'win32' ? 'gray' : ['white','dim'],
|
|
|
|
infoBold: ['white','dim'],
|
|
|
|
warn: 'yellow',
|
|
|
|
error: 'red',
|
|
|
|
guide: 'yellow',
|
|
|
|
status: 'gray',//['white','dim'],
|
|
|
|
useful: 'green',
|
|
|
|
});
|
|
|
|
|
2015-12-28 09:39:03 +00:00
|
|
|
function genTheme( fmt, src, themeName, themeLoc, testTitle ) {
|
|
|
|
themeLoc = themeLoc || themeName;
|
|
|
|
testTitle = themeName.toUpperCase() + ' theme should generate without throwing an exception';
|
|
|
|
it( testTitle, function () {
|
2015-12-12 16:13:37 +00:00
|
|
|
function tryOpen() {
|
2015-12-28 09:39:03 +00:00
|
|
|
//var src = ['node_modules/jane-q-fullstacker/resume/jane-resume.json'];
|
|
|
|
var dst = ['test/sandbox/' + fmt + '/' + themeName + '/resume.all'];
|
2015-12-12 16:13:37 +00:00
|
|
|
var opts = {
|
2015-12-28 09:39:03 +00:00
|
|
|
theme: themeLoc,
|
|
|
|
format: fmt,
|
2015-12-12 16:13:37 +00:00
|
|
|
prettify: true,
|
2015-12-21 07:58:16 +00:00
|
|
|
silent: true
|
2015-12-12 16:13:37 +00:00
|
|
|
};
|
2015-12-28 09:39:03 +00:00
|
|
|
FCMD.verbs.build( src, dst, opts, function() {} );
|
2015-12-12 16:13:37 +00:00
|
|
|
}
|
|
|
|
tryOpen.should.not.Throw();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2015-12-28 09:39:03 +00:00
|
|
|
var src = ['node_modules/jane-q-fullstacker/resume/jane-resume.json'];
|
|
|
|
genTheme('FRESH', src, 'hello-world');
|
|
|
|
genTheme('FRESH', src, 'compact');
|
|
|
|
genTheme('FRESH', src, 'modern');
|
|
|
|
genTheme('FRESH', src, 'minimist');
|
|
|
|
genTheme('FRESH', src, 'awesome');
|
|
|
|
genTheme('FRESH', src, 'positive');
|
|
|
|
genTheme('FRESH', src, 'jsonresume-theme-boilerplate', 'node_modules/jsonresume-theme-boilerplate' );
|
|
|
|
genTheme('FRESH', src, 'jsonresume-theme-sceptile', 'node_modules/jsonresume-theme-sceptile' );
|
|
|
|
genTheme('FRESH', src, 'jsonresume-theme-modern', 'node_modules/jsonresume-theme-modern' );
|
|
|
|
genTheme('FRESH', src, 'jsonresume-theme-classy', 'node_modules/jsonresume-theme-classy' );
|
|
|
|
|
|
|
|
src = ['test/resumes/jrs-0.0.0/richard-hendriks.json'];
|
|
|
|
genTheme('JRS', src, 'hello-world');
|
|
|
|
genTheme('JRS', src, 'compact');
|
|
|
|
genTheme('JRS', src, 'modern');
|
|
|
|
genTheme('JRS', src, 'minimist');
|
|
|
|
genTheme('JRS', src, 'awesome');
|
|
|
|
genTheme('JRS', src, 'positive');
|
2015-12-29 11:35:55 +00:00
|
|
|
genTheme('JRS', src, 'jsonresume-theme-boilerplate', 'node_modules/jsonresume-theme-boilerplate' );
|
2015-12-28 09:39:03 +00:00
|
|
|
genTheme('JRS', src, 'jsonresume-theme-sceptile', 'node_modules/jsonresume-theme-sceptile' );
|
|
|
|
genTheme('JRS', src, 'jsonresume-theme-modern', 'node_modules/jsonresume-theme-modern' );
|
|
|
|
genTheme('JRS', src, 'jsonresume-theme-classy', 'node_modules/jsonresume-theme-classy' );
|
2015-12-09 10:41:04 +00:00
|
|
|
|
|
|
|
});
|