From 0c1b1734ee997e494650715e0cc2776218858beb Mon Sep 17 00:00:00 2001 From: devlinjd Date: Thu, 19 Nov 2015 15:39:26 -0500 Subject: [PATCH] Update tests. --- src/core/convert.js | 20 +++++++++++--------- tests/test-fresh-sheet.js | 16 ++++++++++------ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/core/convert.js b/src/core/convert.js index 3f7a0e5..8745ee3 100644 --- a/src/core/convert.js +++ b/src/core/convert.js @@ -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 }; diff --git a/tests/test-fresh-sheet.js b/tests/test-fresh-sheet.js index 943826a..b8baff6 100644 --- a/tests/test-fresh-sheet.js +++ b/tests/test-fresh-sheet.js @@ -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() ) });