1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-05 09:56:22 +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-contrib-yuidoc": "^0.10.0",
"grunt-simple-mocha": "*", "grunt-simple-mocha": "*",
"jane-q-fullstacker": "fluentdesk/jane-q-fullstacker", "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": "*", "mocha": "*",
"resample": "fluentdesk/resample" "resample": "fluentdesk/resample"
} }

View File

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