@@ -520,6 +520,8 @@ function addTest(manifest, test, tests) {
520
520
}
521
521
522
522
const testOptions = getJsonLdValues ( test , 'option' ) ;
523
+ // allow special handling in case of normative test failures
524
+ let normativeTest = true ;
523
525
524
526
testOptions . forEach ( function ( opt ) {
525
527
const processingModes = getJsonLdValues ( opt , 'processingMode' ) ;
@@ -555,6 +557,13 @@ function addTest(manifest, test, tests) {
555
557
} ) ;
556
558
} ) ;
557
559
560
+ testOptions . forEach ( function ( opt ) {
561
+ const normative = getJsonLdValues ( opt , 'normative' ) ;
562
+ normative . forEach ( function ( n ) {
563
+ normativeTest = normativeTest && n ;
564
+ } ) ;
565
+ } ) ;
566
+
558
567
const fn = testInfo . fn ;
559
568
const params = testInfo . params . map ( param => param ( test ) ) ;
560
569
// resolve test data
@@ -608,6 +617,16 @@ function addTest(manifest, test, tests) {
608
617
} ) ;
609
618
}
610
619
} catch ( err ) {
620
+ // FIXME: improve handling of non-normative errors
621
+ // FIXME: for now, explicitly disabling tests.
622
+ //if(!normativeTest) {
623
+ // // failure ok
624
+ // if(options.verboseSkip) {
625
+ // console.log('Skipping non-normative test due to failure:',
626
+ // {id: test['@id'], name: test.name });
627
+ // }
628
+ // self.skip();
629
+ //}
611
630
if ( options . bailOnError ) {
612
631
if ( err . name !== 'AssertionError' ) {
613
632
console . error ( '\nError: ' , JSON . stringify ( err , null , 2 ) ) ;
0 commit comments