From b99a09c88a16c795ce6b58b78e464dcfad51545d Mon Sep 17 00:00:00 2001 From: hacksalot Date: Sat, 16 Jan 2016 16:29:00 -0500 Subject: [PATCH] Integrate tests with new fresh-jrs-converter structure. --- package.json | 2 +- test/test-api.js | 12 ++++++------ test/test-cli.js | 2 +- test/test-fresh-sheet.js | 4 ++-- test/test-hmr.txt | 6 +++--- test/test-stdout.js | 8 ++++---- test/test-themes.js | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 469d02b..776546e 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "commander": "^2.9.0", "copy": "^0.1.3", "fresca": "~0.4.0", - "fresh-jrs-converter": "^0.1.0", + "fresh-jrs-converter": "^0.1.1", "fresh-resume-starter": "^0.2.0", "fresh-themes": "~0.13.0-beta", "fs-extra": "^0.24.0", diff --git a/test/test-api.js b/test/test-api.js index bc80e8c..aa572c7 100644 --- a/test/test-api.js +++ b/test/test-api.js @@ -34,7 +34,7 @@ describe('Testing CLI interface', function () { }; 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', [], [], opts, " (when a filename isn't specified)" ], - [ 'validate', [ft + 'jane-fullstacker.fresh.json'], [], opts, ' (jane-q-fullstacker|FRESH)' ], - [ 'validate', [ft + 'johnny-trouble.fresh.json'], [], opts, ' (johnny-trouble|FRESH)' ], + [ 'validate', [ft + 'jane-fullstacker.json'], [], opts, ' (jane-q-fullstacker|FRESH)' ], + [ 'validate', [ft + 'johnny-trouble.json'], [], opts, ' (johnny-trouble|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/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)' ], - [ '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)' ], - [ '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.fresh.json'], [ sb + 'shouldnt-exist.pdf' ], EXTEND(true, opts, { theme: 'awesome' }), ' (jane-q-fullstacker + Awesome + PDF|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.json'], [ sb + 'shouldnt-exist.pdf' ], EXTEND(true, opts, { theme: 'awesome' }), ' (jane-q-fullstacker + Awesome + PDF|FRESH)' ] ].forEach( function(a) { diff --git a/test/test-cli.js b/test/test-cli.js index 8d13228..9f177c5 100644 --- a/test/test-cli.js +++ b/test/test-cli.js @@ -22,7 +22,7 @@ var ProcessExitOrg = process.exit; var commandRetVal = 0; -describe('Testing Ouput interface', function () { +describe('Testing CLI interface', function () { // TODO: use sinon // Replacement for process.exit() diff --git a/test/test-fresh-sheet.js b/test/test-fresh-sheet.js index cb15c35..23dd234 100644 --- a/test/test-fresh-sheet.js +++ b/test/test-fresh-sheet.js @@ -58,5 +58,5 @@ function testResume(opts) { } 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: 'johnny-trouble-resume', path: 'node_modules/fresh-test-resumes/src/johnny-trouble.fresh.json', duration: 4, 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/fresh/johnny-trouble.json', duration: 4, sections: sects }); diff --git a/test/test-hmr.txt b/test/test-hmr.txt index 817b240..64cb982 100644 --- a/test/test-hmr.txt +++ b/test/test-hmr.txt @@ -18,10 +18,10 @@ 7|convert doesnt-exist.json 3|validate 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 14|peek doesnt-exist.json 14|peek doesnt-exist.json not.a.path 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/johnny-trouble.fresh.json skills.sets +0|peek node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json employment.history[1] +0|peek node_modules/fresh-test-resumes/src/fresh/johnny-trouble.json skills.sets diff --git a/test/test-stdout.js b/test/test-stdout.js index ee7d8db..40699c5 100644 --- a/test/test-stdout.js +++ b/test/test-stdout.js @@ -93,7 +93,7 @@ describe('Testing Ouput interface', function () { run('BUILD should display an error on a broken resume', ['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' ], [ 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', [ 'build', - 'node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json', + 'node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json', 'to', 'test/sandbox/temp/janeq-1.all', '-o', @@ -122,7 +122,7 @@ describe('Testing Ouput interface', function () { run('HMR should accept a JSON settings file via --options', [ 'build', - 'node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json', + 'node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json', 'to', 'test/sandbox/temp/janeq-2.all', '--options', @@ -132,7 +132,7 @@ describe('Testing Ouput interface', function () { run('Explicit command line options should override --options', [ 'build', - 'node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json', + 'node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json', 'to', 'test/sandbox/temp/janeq-3.all', '--options', diff --git a/test/test-themes.js b/test/test-themes.js index fef4d9c..1da0336 100644 --- a/test/test-themes.js +++ b/test/test-themes.js @@ -77,8 +77,8 @@ function folderContains( needle, haystack ) { }); } -genThemes( 'jane-q-fullstacker', ['node_modules/fresh-test-resumes/src/jane-fullstacker.fresh.json'], 'FRESH' ); -genThemes( 'johnny-trouble', ['node_modules/fresh-test-resumes/src/johnny-trouble.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/fresh/johnny-trouble.json'], 'FRESH' ); genThemes( 'richard-hendriks', ['test/resumes/jrs-0.0.0/richard-hendriks.json'], 'JRS' ); describe('Verifying generated theme files...', function() {