1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-09-28 20:19:12 +01:00

Update tests.

This commit is contained in:
devlinjd 2015-11-19 15:39:26 -05:00
parent 35b9f2b764
commit 0c1b1734ee
2 changed files with 21 additions and 15 deletions

View File

@ -24,8 +24,8 @@ FRESH to JSON Resume conversion routiens.
info: { info: {
label: jrs.basics.label, label: jrs.basics.label,
class: jrs.basics.label, class: jrs.basics.label,
picture: jrs.basics.picture, image: jrs.basics.picture,
summary: jrs.basics.summary brief: jrs.basics.summary
}, },
contact: { contact: {
@ -39,9 +39,7 @@ FRESH to JSON Resume conversion routiens.
region: jrs.basics.location.region, region: jrs.basics.location.region,
country: jrs.basics.location.countryCode, country: jrs.basics.location.countryCode,
code: jrs.basics.location.postalCode, code: jrs.basics.location.postalCode,
address: [ address: jrs.basics.location.address
jrs.basics.location.address,
]
}, },
employment: { employment: {
@ -132,7 +130,9 @@ FRESH to JSON Resume conversion routiens.
}; };
}), }),
interests: jrs.interests interests: jrs.interests,
references: jrs.references
}; };
}, },
@ -145,11 +145,11 @@ FRESH to JSON Resume conversion routiens.
basics: { basics: {
name: fresh.name, name: fresh.name,
summary: fresh.info.summary, summary: fresh.info.brief,
website: fresh.info.website, website: fresh.info.website,
phone: fresh.info.phone, phone: fresh.info.phone,
email: fresh.info.email, email: fresh.info.email,
picture: fresh.info.picture, picture: fresh.info.image,
location: { location: {
address: fresh.location.address.join('\n'), address: fresh.location.address.join('\n'),
postalCode: fresh.location.code, postalCode: fresh.location.code,
@ -233,7 +233,9 @@ FRESH to JSON Resume conversion routiens.
}; };
}), }),
interests: fresh.interests interests: fresh.interests,
references: fresh.references
}; };

View File

@ -9,13 +9,14 @@ var chai = require('chai')
chai.config.includeStack = false; chai.config.includeStack = false;
describe('fullstack.json (FRESH)', function () { describe('fresh-resume-exemplar.json (FRESH)', function () {
var _sheet; var _sheet;
it('should open without throwing an exception', function () { it('should open without throwing an exception', function () {
function tryOpen() { function tryOpen() {
_sheet = new FRESHResume().open( 'tests/exemplars/fresh-exemplar.json' ); _sheet = new FRESHResume().open(
'node_modules/FRESCA/examples/fresh-resume-exemplar.json' );
} }
tryOpen.should.not.Throw(); tryOpen.should.not.Throw();
}); });
@ -23,13 +24,16 @@ describe('fullstack.json (FRESH)', function () {
it('should have one or more of each section', function() { it('should have one or more of each section', function() {
expect( expect(
//(_sheet.basics) && //(_sheet.basics) &&
(_sheet.name && _sheet.info && _sheet.location) && _sheet.name && _sheet.info && _sheet.location && _sheet.contact &&
(_sheet.employment.history && _sheet.employment.history.length > 0) && (_sheet.employment.history && _sheet.employment.history.length > 0) &&
(_sheet.skills && _sheet.skills.length > 0) && (_sheet.skills && _sheet.skills.length > 0) &&
(_sheet.education.history && _sheet.education.history.length > 0) && (_sheet.education.history && _sheet.education.history.length > 0) &&
(_sheet.service.history && _sheet.service.history.length > 0) && (_sheet.service.history && _sheet.service.history.length > 0) &&
(_sheet.publications && _sheet.publications.length > 0) //&& (_sheet.publications && _sheet.publications.length > 0) &&
//(_sheet.awards && _sheet.awards.length > 0) (_sheet.recognition && _sheet.recognition.length > 0) &&
(_sheet.samples && _sheet.samples.length > 0) &&
(_sheet.references && _sheet.references.length > 0) &&
(_sheet.interests && _sheet.interests.length > 0)
).to.equal( true ); ).to.equal( true );
}); });