@@ -485,23 +485,23 @@ describe('compareVersion method', function () {
485
485
describe ( 'getVersionRegexBySpecificationVersion method' , function ( ) {
486
486
it ( 'should return regex for 3.0' , function ( ) {
487
487
const result = getVersionRegexBySpecificationVersion ( '3.0' ) ;
488
- expect ( result . toString ( ) ) . to . equal ( '/openapi[\'|\"]?:\\s? [\\]?[\'|\"]?3.0/' ) ;
488
+ expect ( result . toString ( ) ) . to . equal ( '/openapi[\'|\"]?\\s* :\\s* [\\]?[\'|\"]?3.0/' ) ;
489
489
} ) ;
490
490
it ( 'should return regex for 3.0.0' , function ( ) {
491
491
const result = getVersionRegexBySpecificationVersion ( '3.0.0' ) ;
492
- expect ( result . toString ( ) ) . to . equal ( '/openapi[\'|\"]?:\\s? [\\]?[\'|\"]?3.0/' ) ;
492
+ expect ( result . toString ( ) ) . to . equal ( '/openapi[\'|\"]?\\s* :\\s* [\\]?[\'|\"]?3.0/' ) ;
493
493
} ) ;
494
494
it ( 'should return regex for 3.1' , function ( ) {
495
495
const result = getVersionRegexBySpecificationVersion ( '3.1' ) ;
496
- expect ( result . toString ( ) ) . to . equal ( '/openapi[\'|\"]?:\\s? [\\]?[\'|\"]?3.1/' ) ;
496
+ expect ( result . toString ( ) ) . to . equal ( '/openapi[\'|\"]?\\s* :\\s* [\\]?[\'|\"]?3.1/' ) ;
497
497
} ) ;
498
498
it ( 'should return regex for 2.0' , function ( ) {
499
499
const result = getVersionRegexBySpecificationVersion ( '2.0' ) ;
500
- expect ( result . toString ( ) ) . to . equal ( '/swagger[\'|\"]?:\\s? [\\]?[\'|\"]?2.0/' ) ;
500
+ expect ( result . toString ( ) ) . to . equal ( '/swagger[\'|\"]?\\s* :\\s* [\\]?[\'|\"]?2.0/' ) ;
501
501
} ) ;
502
502
it ( 'should return regex for 3.0 as default' , function ( ) {
503
503
const result = getVersionRegexBySpecificationVersion ( 'invalid' ) ;
504
- expect ( result . toString ( ) ) . to . equal ( '/openapi[\'|\"]?:\\s? [\\]?[\'|\"]?3.0/' ) ;
504
+ expect ( result . toString ( ) ) . to . equal ( '/openapi[\'|\"]?\\s* :\\s* [\\]?[\'|\"]?3.0/' ) ;
505
505
} ) ;
506
506
} ) ;
507
507
0 commit comments