mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-02 20:37:08 +01:00
Update tests.
Knock the dust off the HackMyResume test suite.
This commit is contained in:
@ -40,9 +40,9 @@ var r = {
|
||||
|
||||
var tests = [
|
||||
// single job, concrete start, no end
|
||||
[ { start: '2010-01-01' } , { val: 6, unit: 'year' } ],
|
||||
[ { start: '2010-01' } , { val: 6, unit: 'year' } ],
|
||||
[ { start: '2010' } , { val: 6, unit: 'year' } ],
|
||||
[ { start: '2010-01-01' } , { val: 8, unit: 'year' } ],
|
||||
[ { start: '2010-01' } , { val: 8, unit: 'year' } ],
|
||||
[ { start: '2010' } , { val: 8, unit: 'year' } ],
|
||||
|
||||
// single job, concrete start, concrete end
|
||||
[ { start: '2010-01-01', end: '2015-01-01' } , { val: 5, unit: 'year' } ],
|
||||
@ -61,10 +61,10 @@ var tests = [
|
||||
[ { start: undefined, end: undefined } , { val: 0, unit: 'year' } ],
|
||||
|
||||
// two jobs (concrete start + end) -> ( concrete start )
|
||||
[ { start: '2000-01', end: '2013-01' }, { start: '2013-01' }, { val: 16, unit: 'year' } ],
|
||||
[ { start: '2000-01', end: '2013-01' }, { start: '2013-01', end: '' }, { val: 16, unit: 'year' } ],
|
||||
[ { start: '2000-01', end: '2013-01' }, { start: '2013-01', end: null }, { val: 16, unit: 'year' } ],
|
||||
[ { start: '2000-01', end: '2013-01' }, { start: '2013-01', end: 'current' }, { val: 16, unit: 'year' } ]
|
||||
[ { start: '2000-01', end: '2013-01' }, { start: '2013-01' }, { val: 18, unit: 'year' } ],
|
||||
[ { start: '2000-01', end: '2013-01' }, { start: '2013-01', end: '' }, { val: 18, unit: 'year' } ],
|
||||
[ { start: '2000-01', end: '2013-01' }, { start: '2013-01', end: null }, { val: 18, unit: 'year' } ],
|
||||
[ { start: '2000-01', end: '2013-01' }, { start: '2013-01', end: 'current' }, { val: 18, unit: 'year' } ]
|
||||
|
||||
];
|
||||
|
||||
|
@ -73,14 +73,14 @@ 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/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 });
|
||||
testResume({ title: 'jane-q-fullstacker', path: 'node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json', duration: 9, sections: sects });
|
||||
testResume({ title: 'johnny-trouble-resume', path: 'node_modules/fresh-test-resumes/src/fresh/johnny-trouble.json', duration: 6, sections: sects });
|
||||
|
||||
sects = [ 'info', 'contact', 'location' ];
|
||||
testResume({ title: 'jane-q-fullstacker A', path: 'node_modules/fresh-test-resumes/src/fresh/override/jane-partial-a.json', duration: 0, sections: sects });
|
||||
|
||||
sects = [ 'projects', 'social', 'employment', 'education', 'affiliation' ];
|
||||
testResume({ title: 'jane-q-fullstacker B', path: 'node_modules/fresh-test-resumes/src/fresh/override/jane-partial-b.json', duration: 7, sections: sects });
|
||||
testResume({ title: 'jane-q-fullstacker B', path: 'node_modules/fresh-test-resumes/src/fresh/override/jane-partial-b.json', duration: 9, sections: sects });
|
||||
|
||||
sects = [ 'service', 'skills', 'samples', 'writing', 'reading', 'speaking', 'recognition', 'references', 'testimonials', 'languages', 'interests', 'extracurricular', 'governance' ];
|
||||
testResume({ title: 'jane-q-fullstacker C', path: 'node_modules/fresh-test-resumes/src/fresh/override/jane-partial-c.json', duration: 0, sections: sects });
|
||||
|
@ -75,7 +75,7 @@ function testResume( opts ) {
|
||||
|
||||
var sects = [ 'basics', 'work', 'volunteer', 'skills', 'education', 'publications', 'awards', 'references' ];
|
||||
|
||||
testResume({ title: 'jane-q-fullstacker', duration: 7, sections: sects });
|
||||
testResume({ title: 'jane-q-fullstacker', duration: 9, sections: sects });
|
||||
testResume({ title: 'jane-incomplete', duration: 0, sections: _.without(sects, 'awards', 'work') });
|
||||
testResume({ title: 'richard-hendriks', duration: 1, sections: sects });
|
||||
testResume({ title: 'empty', duration: 0, sections: [], isValid: false });
|
||||
|
Reference in New Issue
Block a user