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

Integrate tests with new fresh-jrs-converter structure.

This commit is contained in:
hacksalot 2016-01-16 16:29:00 -05:00
parent 5c95fe7af1
commit b99a09c88a
7 changed files with 19 additions and 19 deletions

View File

@ -52,7 +52,7 @@
"commander": "^2.9.0", "commander": "^2.9.0",
"copy": "^0.1.3", "copy": "^0.1.3",
"fresca": "~0.4.0", "fresca": "~0.4.0",
"fresh-jrs-converter": "^0.1.0", "fresh-jrs-converter": "^0.1.1",
"fresh-resume-starter": "^0.2.0", "fresh-resume-starter": "^0.2.0",
"fresh-themes": "~0.13.0-beta", "fresh-themes": "~0.13.0-beta",
"fs-extra": "^0.24.0", "fs-extra": "^0.24.0",

View File

@ -34,7 +34,7 @@ describe('Testing CLI interface', function () {
}; };
var sb = 'test/sandbox/'; var sb = 'test/sandbox/';
var ft = 'node_modules/fresh-test-resumes/src/'; var ft = 'node_modules/fresh-test-resumes/src/fresh/';
[ [
@ -44,18 +44,18 @@ describe('Testing CLI interface', function () {
[ 'new', [sb + 'new-jrs-1.json', sb + 'new-jrs-2.json', sb + 'new-jrs-3.json'], [], opts, ' (multiple JRS resumes)' ], [ 'new', [sb + 'new-jrs-1.json', sb + 'new-jrs-2.json', sb + 'new-jrs-3.json'], [], opts, ' (multiple JRS resumes)' ],
[ '!new', [], [], opts, " (when a filename isn't specified)" ], [ '!new', [], [], opts, " (when a filename isn't specified)" ],
[ 'validate', [ft + 'jane-fullstacker.fresh.json'], [], opts, ' (jane-q-fullstacker|FRESH)' ], [ 'validate', [ft + 'jane-fullstacker.json'], [], opts, ' (jane-q-fullstacker|FRESH)' ],
[ 'validate', [ft + 'johnny-trouble.fresh.json'], [], opts, ' (johnny-trouble|FRESH)' ], [ 'validate', [ft + 'johnny-trouble.json'], [], opts, ' (johnny-trouble|FRESH)' ],
[ 'validate', [sb + 'new-fresh-resume.json'], [], opts, ' (new-fresh-resume|FRESH)' ], [ 'validate', [sb + 'new-fresh-resume.json'], [], opts, ' (new-fresh-resume|FRESH)' ],
[ 'validate', ['test/resumes/jrs-0.0.0/richard-hendriks.json'], [], opts2, ' (richard-hendriks.json|JRS)' ], [ 'validate', ['test/resumes/jrs-0.0.0/richard-hendriks.json'], [], opts2, ' (richard-hendriks.json|JRS)' ],
[ 'validate', ['test/resumes/jrs-0.0.0/jane-incomplete.json'], [], opts2, ' (jane-incomplete.json|JRS)' ], [ 'validate', ['test/resumes/jrs-0.0.0/jane-incomplete.json'], [], opts2, ' (jane-incomplete.json|JRS)' ],
[ 'validate', [sb + 'new-1.json', sb + 'new-jrs-resume.json', sb + 'new-1.json', sb + 'new-2.json', sb + 'new-3.json'], [], opts, ' (5|BOTH)' ], [ 'validate', [sb + 'new-1.json', sb + 'new-jrs-resume.json', sb + 'new-1.json', sb + 'new-2.json', sb + 'new-3.json'], [], opts, ' (5|BOTH)' ],
[ 'analyze', [ft + 'jane-fullstacker.fresh.json'], [], opts, ' (jane-q-fullstacker|FRESH)' ], [ 'analyze', [ft + 'jane-fullstacker.json'], [], opts, ' (jane-q-fullstacker|FRESH)' ],
[ 'analyze', ['test/resumes/jrs-0.0.0/richard-hendriks.json'], [], opts2, ' (richard-hendriks|JRS)' ], [ 'analyze', ['test/resumes/jrs-0.0.0/richard-hendriks.json'], [], opts2, ' (richard-hendriks|JRS)' ],
[ 'build', [ ft + 'jane-fullstacker.fresh.json', ft + 'override/jane-fullstacker-override.fresh.json' ], [ sb + 'merged/jane-fullstacker-gamedev.fresh.all'], opts, ' (jane-q-fullstacker w/ override|FRESH)' ], [ 'build', [ ft + 'jane-fullstacker.json', ft + 'override/jane-fullstacker-override.fresh.json' ], [ sb + 'merged/jane-fullstacker-gamedev.fresh.all'], opts, ' (jane-q-fullstacker w/ override|FRESH)' ],
[ '!build', [ ft + 'jane-fullstacker.fresh.json'], [ sb + 'shouldnt-exist.pdf' ], EXTEND(true, opts, { theme: 'awesome' }), ' (jane-q-fullstacker + Awesome + PDF|FRESH)' ] [ '!build', [ ft + 'jane-fullstacker.json'], [ sb + 'shouldnt-exist.pdf' ], EXTEND(true, opts, { theme: 'awesome' }), ' (jane-q-fullstacker + Awesome + PDF|FRESH)' ]
].forEach( function(a) { ].forEach( function(a) {

View File

@ -22,7 +22,7 @@ var ProcessExitOrg = process.exit;
var commandRetVal = 0; var commandRetVal = 0;
describe('Testing Ouput interface', function () { describe('Testing CLI interface', function () {
// TODO: use sinon // TODO: use sinon
// Replacement for process.exit() // Replacement for process.exit()

View File

@ -58,5 +58,5 @@ function testResume(opts) {
} }
var sects = [ 'info', 'employment', 'service', 'skills', 'education', 'writing', 'recognition', 'references' ]; var sects = [ 'info', 'employment', 'service', 'skills', 'education', 'writing', 'recognition', 'references' ];
testResume({ title: 'jane-q-fullstacker', path: 'node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json', duration: 7, sections: sects }); testResume({ title: 'jane-q-fullstacker', path: 'node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json', duration: 7, sections: sects });
testResume({ title: 'johnny-trouble-resume', path: 'node_modules/fresh-test-resumes/src/johnny-trouble.fresh.json', duration: 4, sections: sects }); testResume({ title: 'johnny-trouble-resume', path: 'node_modules/fresh-test-resumes/src/fresh/johnny-trouble.json', duration: 4, sections: sects });

View File

@ -18,10 +18,10 @@
7|convert doesnt-exist.json 7|convert doesnt-exist.json
3|validate 3|validate
14|validate doesnt-exist.json 14|validate doesnt-exist.json
0|validate node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json 0|validate node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json
3|peek 3|peek
14|peek doesnt-exist.json 14|peek doesnt-exist.json
14|peek doesnt-exist.json not.a.path 14|peek doesnt-exist.json not.a.path
0|peek test/resumes/jrs-0.0.0/richard-hendriks.json work[0] 0|peek test/resumes/jrs-0.0.0/richard-hendriks.json work[0]
0|peek node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json employment.history[1] 0|peek node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json employment.history[1]
0|peek node_modules/fresh-test-resumes/src/johnny-trouble.fresh.json skills.sets 0|peek node_modules/fresh-test-resumes/src/fresh/johnny-trouble.json skills.sets

View File

@ -93,7 +93,7 @@ describe('Testing Ouput interface', function () {
run('BUILD should display an error on a broken resume', run('BUILD should display an error on a broken resume',
['build', ['build',
'node_modules/fresh-test-resumes/src/johnny-trouble.broken.fresh.json', 'node_modules/fresh-test-resumes/src/fresh/johnny-trouble.broken.json',
'-t', 'modern' '-t', 'modern'
], [ title, 'Error: Invalid or corrupt JSON on line' ]); ], [ title, 'Error: Invalid or corrupt JSON on line' ]);
@ -112,7 +112,7 @@ describe('Testing Ouput interface', function () {
run('HMR should accept raw JSON via --options', run('HMR should accept raw JSON via --options',
[ [
'build', 'build',
'node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json', 'node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json',
'to', 'to',
'test/sandbox/temp/janeq-1.all', 'test/sandbox/temp/janeq-1.all',
'-o', '-o',
@ -122,7 +122,7 @@ describe('Testing Ouput interface', function () {
run('HMR should accept a JSON settings file via --options', run('HMR should accept a JSON settings file via --options',
[ [
'build', 'build',
'node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json', 'node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json',
'to', 'to',
'test/sandbox/temp/janeq-2.all', 'test/sandbox/temp/janeq-2.all',
'--options', '--options',
@ -132,7 +132,7 @@ describe('Testing Ouput interface', function () {
run('Explicit command line options should override --options', run('Explicit command line options should override --options',
[ [
'build', 'build',
'node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json', 'node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json',
'to', 'to',
'test/sandbox/temp/janeq-3.all', 'test/sandbox/temp/janeq-3.all',
'--options', '--options',

View File

@ -77,8 +77,8 @@ function folderContains( needle, haystack ) {
}); });
} }
genThemes( 'jane-q-fullstacker', ['node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json'], 'FRESH' ); genThemes( 'jane-q-fullstacker', ['node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json'], 'FRESH' );
genThemes( 'johnny-trouble', ['node_modules/fresh-test-resumes/src/johnny-trouble.fresh.json'], 'FRESH' ); genThemes( 'johnny-trouble', ['node_modules/fresh-test-resumes/src/fresh/johnny-trouble.json'], 'FRESH' );
genThemes( 'richard-hendriks', ['test/resumes/jrs-0.0.0/richard-hendriks.json'], 'JRS' ); genThemes( 'richard-hendriks', ['test/resumes/jrs-0.0.0/richard-hendriks.json'], 'JRS' );
describe('Verifying generated theme files...', function() { describe('Verifying generated theme files...', function() {