@@ -15,7 +15,7 @@ var oldNode = process.version.startsWith('v4.')
15
15
var nativeParser = process . argv [ 2 ] === '--native-parser'
16
16
parse = nativeParser ? exported . parseNative : exported . parseCustom
17
17
18
- function checkLimitedErrorInformation ( error ) {
18
+ function checkErrorInformation ( error ) {
19
19
assert . equal ( typeof error . message , 'string' )
20
20
assert . equal ( typeof error . reason , 'string' )
21
21
assert . equal ( typeof error . exzerpt , 'string' )
@@ -69,14 +69,13 @@ if (!nativeParser) {
69
69
exports [ 'test limited error information' ] = function ( ) {
70
70
var json = '{"foo": ?}'
71
71
var parser = new Parser ( {
72
- ignoreComments : true ,
73
- limitedErrorInfo : true
72
+ ignoreComments : true
74
73
} )
75
74
try {
76
75
parser . parse ( json )
77
76
assert . fail ( )
78
77
} catch ( error ) {
79
- checkLimitedErrorInformation ( error )
78
+ checkErrorInformation ( error )
80
79
}
81
80
}
82
81
} else {
@@ -86,7 +85,7 @@ if (!nativeParser) {
86
85
parse ( json )
87
86
assert . fail ( )
88
87
} catch ( error ) {
89
- checkLimitedErrorInformation ( error )
88
+ checkErrorInformation ( error )
90
89
}
91
90
}
92
91
}
@@ -328,12 +327,12 @@ exports['test schema validation failure'] = function () {
328
327
var data = fs . readFileSync ( path . join ( __dirname , '/passes/3.schema.json' ) ) . toString ( )
329
328
var schema = fs . readFileSync ( path . join ( __dirname , '/passes/3.schema.json' ) ) . toString ( )
330
329
var validate = validator . compile ( schema , {
331
- limitedErrorInfo : nativeParser ,
330
+ ignoreComments : ! nativeParser ,
332
331
environment : 'json-schema-draft-04'
333
332
} )
334
333
assert [ 'throws' ] ( function ( ) {
335
334
validate ( parse ( data , {
336
- limitedErrorInfo : nativeParser
335
+ ignoreComments : ! nativeParser
337
336
} ) )
338
337
} , 'should throw error' )
339
338
}
0 commit comments