From 1b3fdfbc5fe17a0567392b688f21f732cf1db9bd Mon Sep 17 00:00:00 2001 From: devlinjd Date: Thu, 19 Nov 2015 16:24:56 -0500 Subject: [PATCH] Add FRESH validation test. --- tests/test-fresh-sheet.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/test-fresh-sheet.js b/tests/test-fresh-sheet.js index b8baff6..a7a9aae 100644 --- a/tests/test-fresh-sheet.js +++ b/tests/test-fresh-sheet.js @@ -53,14 +53,15 @@ describe('fresh-resume-exemplar.json (FRESH)', function () { _sheet.stringify().should.equal( savedSheet.stringify() ) }); - // it('should validate against the FRESH resume schema', function() { - // var schemaJson = require('../src/core/resume.json'); - // var validate = validator( schemaJson, { verbose: true } ); - // var result = validate( JSON.parse( _sheet.meta.raw ) ); - // result || console.log("\n\nOops, resume didn't validate. " + - // "Validation errors:\n\n", validate.errors, "\n\n"); - // result.should.equal( true ); - // }); + it('should validate against the FRESH resume schema', function() { + var result = _sheet.isValid(); + // var schemaJson = require('FRESCA'); + // var validate = validator( schemaJson, { verbose: true } ); + // var result = validate( JSON.parse( _sheet.meta.raw ) ); + result || console.log("\n\nOops, resume didn't validate. " + + "Validation errors:\n\n", _sheet.meta.validationErrors, "\n\n"); + result.should.equal( true ); + }); });