@@ -73,11 +73,11 @@ describe("Invalid syntax", () => {
7373 }
7474 } ) ;
7575
76- describe ( "when failFast is false " , ( ) => {
76+ describe ( "when continueOnError is true " , ( ) => {
7777 it ( "should throw a grouped error for an invalid file path" , async ( ) => {
7878 const parser = new $RefParser ( ) ;
7979 try {
80- await parser . dereference ( "this file does not exist" , { failFast : false } ) ;
80+ await parser . dereference ( "this file does not exist" , { continueOnError : true } ) ;
8181 helper . shouldNotGetCalled ( ) ;
8282 }
8383 catch ( err ) {
@@ -100,7 +100,7 @@ describe("Invalid syntax", () => {
100100 it ( "should throw a grouped error for an invalid YAML file" , async ( ) => {
101101 const parser = new $RefParser ( ) ;
102102 try {
103- await parser . dereference ( path . rel ( "specs/invalid/invalid.yaml" ) , { failFast : false } ) ;
103+ await parser . dereference ( path . rel ( "specs/invalid/invalid.yaml" ) , { continueOnError : true } ) ;
104104 helper . shouldNotGetCalled ( ) ;
105105 }
106106 catch ( err ) {
@@ -122,7 +122,7 @@ describe("Invalid syntax", () => {
122122 it ( "should throw a grouped error for an invalid JSON file" , async ( ) => {
123123 const parser = new $RefParser ( ) ;
124124 try {
125- await parser . dereference ( path . rel ( "specs/invalid/invalid.json" ) , { failFast : false } ) ;
125+ await parser . dereference ( path . rel ( "specs/invalid/invalid.json" ) , { continueOnError : true } ) ;
126126 helper . shouldNotGetCalled ( ) ;
127127 }
128128 catch ( err ) {
@@ -144,7 +144,7 @@ describe("Invalid syntax", () => {
144144 it ( "should throw a grouped error for an invalid JSON file with YAML disabled" , async ( ) => {
145145 const parser = new $RefParser ( ) ;
146146 try {
147- await parser . dereference ( path . rel ( "specs/invalid/invalid.json" ) , { failFast : false , parse : { yaml : false } } ) ;
147+ await parser . dereference ( path . rel ( "specs/invalid/invalid.json" ) , { continueOnError : true , parse : { yaml : false } } ) ;
148148 helper . shouldNotGetCalled ( ) ;
149149 }
150150 catch ( err ) {
@@ -165,7 +165,7 @@ describe("Invalid syntax", () => {
165165
166166 it ( "should not throw an error for an invalid YAML file with JSON and YAML disabled" , async ( ) => {
167167 const parser = new $RefParser ( ) ;
168- const result = await parser . dereference ( path . rel ( "specs/invalid/invalid.yaml" ) , { failFast : false , parse : { yaml : false , json : false } } ) ;
168+ const result = await parser . dereference ( path . rel ( "specs/invalid/invalid.yaml" ) , { continueOnError : true , parse : { yaml : false , json : false } } ) ;
169169 expect ( result ) . to . be . null ;
170170 } ) ;
171171 } ) ;
@@ -222,11 +222,11 @@ describe("Invalid syntax", () => {
222222 } ) ;
223223 } ) ;
224224
225- describe ( "when failFast is false " , ( ) => {
225+ describe ( "when continueOnError is true " , ( ) => {
226226 it ( "should throw a grouped error for an invalid file path" , async ( ) => {
227227 try {
228228 const parser = new $RefParser ( ) ;
229- await parser . dereference ( { foo : { $ref : "this file does not exist" } } , { failFast : false } ) ;
229+ await parser . dereference ( { foo : { $ref : "this file does not exist" } } , { continueOnError : true } ) ;
230230 helper . shouldNotGetCalled ( ) ;
231231 }
232232 catch ( err ) {
@@ -247,7 +247,7 @@ describe("Invalid syntax", () => {
247247 it ( "should throw a grouped error for an invalid YAML file" , async ( ) => {
248248 try {
249249 const parser = new $RefParser ( ) ;
250- await parser . dereference ( { foo : { $ref : path . rel ( "specs/invalid/invalid.yaml" ) } } , { failFast : false } ) ;
250+ await parser . dereference ( { foo : { $ref : path . rel ( "specs/invalid/invalid.yaml" ) } } , { continueOnError : true } ) ;
251251 helper . shouldNotGetCalled ( ) ;
252252 }
253253 catch ( err ) {
@@ -268,7 +268,7 @@ describe("Invalid syntax", () => {
268268 it ( "should throw a grouped error for an invalid JSON file" , async ( ) => {
269269 try {
270270 const parser = new $RefParser ( ) ;
271- await parser . dereference ( { foo : { $ref : path . rel ( "specs/invalid/invalid.json" ) } } , { failFast : false } ) ;
271+ await parser . dereference ( { foo : { $ref : path . rel ( "specs/invalid/invalid.json" ) } } , { continueOnError : true } ) ;
272272 helper . shouldNotGetCalled ( ) ;
273273 }
274274 catch ( err ) {
@@ -289,7 +289,7 @@ describe("Invalid syntax", () => {
289289 it ( "should throw a grouped error for an invalid JSON file with YAML disabled" , async ( ) => {
290290 try {
291291 const parser = new $RefParser ( ) ;
292- await parser . dereference ( { foo : { $ref : path . rel ( "specs/invalid/invalid.json" ) } } , { failFast : false , parse : { yaml : false } } ) ;
292+ await parser . dereference ( { foo : { $ref : path . rel ( "specs/invalid/invalid.json" ) } } , { continueOnError : true , parse : { yaml : false } } ) ;
293293 helper . shouldNotGetCalled ( ) ;
294294 }
295295 catch ( err ) {
@@ -309,7 +309,7 @@ describe("Invalid syntax", () => {
309309
310310 it ( "should not throw an error for an invalid YAML file with JSON and YAML disabled" , async ( ) => {
311311 const parser = new $RefParser ( ) ;
312- const result = await parser . dereference ( { foo : { $ref : path . rel ( "specs/invalid/invalid.yaml" ) } } , { failFast : false , parse : { yaml : false , json : false } } ) ;
312+ const result = await parser . dereference ( { foo : { $ref : path . rel ( "specs/invalid/invalid.yaml" ) } } , { continueOnError : true , parse : { yaml : false , json : false } } ) ;
313313 expect ( result ) . to . deep . equal ( { foo : ":\n" } ) ;
314314 } ) ;
315315 } ) ;
0 commit comments