1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-12-23 05:37:23 +00: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: {
label: jrs.basics.label,
class: jrs.basics.label,
picture: jrs.basics.picture,
summary: jrs.basics.summary
image: jrs.basics.picture,
brief: jrs.basics.summary
},
contact: {
@ -39,9 +39,7 @@ FRESH to JSON Resume conversion routiens.
region: jrs.basics.location.region,
country: jrs.basics.location.countryCode,
code: jrs.basics.location.postalCode,
address: [
jrs.basics.location.address,
]
address: jrs.basics.location.address
},
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: {
name: fresh.name,
summary: fresh.info.summary,
summary: fresh.info.brief,
website: fresh.info.website,
phone: fresh.info.phone,
email: fresh.info.email,
picture: fresh.info.picture,
picture: fresh.info.image,
location: {
address: fresh.location.address.join('\n'),
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;
describe('fullstack.json (FRESH)', function () {
describe('fresh-resume-exemplar.json (FRESH)', function () {
var _sheet;
it('should open without throwing an exception', function () {
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();
});
@ -23,13 +24,16 @@ describe('fullstack.json (FRESH)', function () {
it('should have one or more of each section', function() {
expect(
//(_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.skills && _sheet.skills.length > 0) &&
(_sheet.education.history && _sheet.education.history.length > 0) &&
(_sheet.service.history && _sheet.service.history.length > 0) &&
(_sheet.publications && _sheet.publications.length > 0) //&&
//(_sheet.awards && _sheet.awards.length > 0)
(_sheet.publications && _sheet.publications.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 );
});
@ -45,7 +49,7 @@ describe('fullstack.json (FRESH)', function () {
});
it('should not be modified after saving', function() {
var savedSheet = new FRESHResume().open( 'tests/sandbox/fullstack.json' );
var savedSheet = new FRESHResume().open('tests/sandbox/fullstack.json');
_sheet.stringify().should.equal( savedSheet.stringify() )
});