1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-05 01:56:21 +00:00

Add tests for FRESH/JRS cross-generation.

Ability to generate JSON Resume themes from FRESH format resumes and
vice-versa.
This commit is contained in:
hacksalot 2015-12-28 04:39:03 -05:00
parent 3c1ae4cbd1
commit 6bc6b3262e
2 changed files with 36 additions and 13 deletions

View File

@ -77,6 +77,10 @@
"grunt-contrib-yuidoc": "^0.10.0",
"grunt-simple-mocha": "*",
"jane-q-fullstacker": "fluentdesk/jane-q-fullstacker",
"jsonresume-theme-boilerplate": "^0.1.2",
"jsonresume-theme-classy": "^1.0.9",
"jsonresume-theme-modern": "0.0.18",
"jsonresume-theme-sceptile": "^1.0.5",
"mocha": "*",
"resample": "fluentdesk/resample"
}

View File

@ -26,14 +26,16 @@ describe('Testing themes', function () {
useful: 'green',
});
function genTheme( themeName ) {
it( themeName.toUpperCase() + ' theme should generate without throwing an exception', function () {
function genTheme( fmt, src, themeName, themeLoc, testTitle ) {
themeLoc = themeLoc || themeName;
testTitle = themeName.toUpperCase() + ' theme should generate without throwing an exception';
it( testTitle, function () {
function tryOpen() {
var src = ['node_modules/jane-q-fullstacker/resume/jane-resume.json'];
var dst = ['test/sandbox/' + themeName + '/resume.all'];
//var src = ['node_modules/jane-q-fullstacker/resume/jane-resume.json'];
var dst = ['test/sandbox/' + fmt + '/' + themeName + '/resume.all'];
var opts = {
theme: themeName,
format: 'FRESH',
theme: themeLoc,
format: fmt,
prettify: true,
silent: true
};
@ -43,11 +45,28 @@ describe('Testing themes', function () {
});
}
genTheme('hello-world');
genTheme('compact');
genTheme('modern');
genTheme('minimist');
genTheme('awesome');
genTheme('positive');
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');
genTheme('JRS', src, 'jsonresume-theme-boilerplate', 'node_modules/jsonresume-theme-boilerplate' );
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' );
});