Add unit tests to verify data integrity

This commit is contained in:
Andrew Miner
2015-03-25 19:11:19 -07:00
parent 351d84178d
commit 321cffcdcc
5 changed files with 52 additions and 1 deletions
@@ -12,6 +12,7 @@ module.exports = class VersionedParserBase
constructor: (options={})->
@_parsers = @_createParsers options
@_currentSchema = _.chain(@_parsers).keys().last().value()
@errors = []
# Class Members ################################################################################
@@ -27,6 +28,7 @@ module.exports = class VersionedParserBase
if not parser? then throw new Error "schema version #{schema} is not supported"
parser.parse text
@errors = parser.errors
return @_model