File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ var fixture = [
1616 'foo 0.0.0 bar 0.0.0'
1717] ;
1818
19- it ( 'should match semver versions' , function ( ) {
19+ it ( 'should match semver versions on test ' , function ( ) {
2020 fixture . forEach ( function ( el ) {
2121 assert ( semverRegex ( ) . test ( el ) , el ) ;
2222 } ) ;
@@ -26,3 +26,13 @@ it('should match semver versions', function () {
2626 assert ( ! semverRegex ( ) . test ( '1.08.0' ) ) ;
2727 assert ( ! semverRegex ( ) . test ( '01.8.0' ) ) ;
2828} ) ;
29+
30+ it ( 'should return semver on match' , function ( ) {
31+ assert . deepEqual ( '0.0.0' . match ( semverRegex ( ) ) , [ '0.0.0' ] ) ;
32+ assert . deepEqual ( 'foo 0.0.0 bar 0.1.1' . match ( semverRegex ( ) ) , [ '0.0.0' , '0.1.1' ] ) ;
33+ } ) ;
34+
35+ // See: https://github.com/sindresorhus/semver-regex/issues/7
36+ it . skip ( 'should not return tag prefix' , function ( ) {
37+ assert . deepEqual ( 'v0.0.0' . match ( semverRegex ( ) ) , [ '0.0.0' ] )
38+ } ) ;
You can’t perform that action at this time.
0 commit comments