99 lt
1010} = require ( './branch' ) ;
1111
12- describe ( 'branches' , ( ) => {
12+ describe ( 'branches' , function ( ) {
1313 if ( ! ! process . env . EVERGREEN && process . platform === 'darwin' ) {
1414 // These tests are not working well on Evergreen macOS machines and we will
1515 // skip them for now (they will run in GitHub CI)
@@ -18,17 +18,17 @@ describe('branches', () => {
1818 return ;
1919 }
2020
21- describe ( 'isMainBranch' , ( ) => {
22- it ( 'returns true only if branch is main' , ( ) => {
21+ describe ( 'isMainBranch' , function ( ) {
22+ it ( 'returns true only if branch is main' , function ( ) {
2323 expect ( isMainBranch ( 'main' ) ) . to . be . true ;
2424 expect ( isMainBranch ( 'beta' ) ) . to . be . false ;
2525 expect ( isMainBranch ( 'release/1.2.33' ) ) . to . be . false ;
2626 expect ( isMainBranch ( '1.22-releases' ) ) . to . be . false ;
2727 } ) ;
2828 } ) ;
2929
30- describe ( 'isReleaseBranch' , ( ) => {
31- it ( 'returns true only for a release branch' , ( ) => {
30+ describe ( 'isReleaseBranch' , function ( ) {
31+ it ( 'returns true only for a release branch' , function ( ) {
3232 expect ( isReleaseBranch ( 'main' ) ) . to . be . false ;
3333 expect ( isReleaseBranch ( 'beta' ) ) . to . be . false ;
3434 expect ( isReleaseBranch ( 'release/1.2.33' ) ) . to . be . false ;
@@ -37,40 +37,40 @@ describe('branches', () => {
3737 } ) ;
3838 } ) ;
3939
40- describe ( 'buildReleaseBranchName' , ( ) => {
41- it ( 'returns a release branch name from version' , ( ) => {
40+ describe ( 'buildReleaseBranchName' , function ( ) {
41+ it ( 'returns a release branch name from version' , function ( ) {
4242 expect ( buildReleaseBranchName ( '1.2' ) ) . to . equal ( '1.2-releases' ) ;
4343 } ) ;
4444 } ) ;
4545
46- describe ( 'getFirstBeta' , ( ) => {
47- it ( 'throws if not release branch' , ( ) => {
46+ describe ( 'getFirstBeta' , function ( ) {
47+ it ( 'throws if not release branch' , function ( ) {
4848 expect ( ( ) => {
4949 getFirstBeta ( 'somebranch' ) ;
5050 } ) . to . throw ( 'not a release branch' ) ;
5151 } ) ;
5252
53- it ( 'returns the first beta for a release branch' , ( ) => {
53+ it ( 'returns the first beta for a release branch' , function ( ) {
5454 expect ( getFirstBeta ( '1.22-releases' ) ) . to . equal ( '1.22.0-beta.0' ) ;
5555 expect ( getFirstBeta ( '1.2-releases' ) ) . to . equal ( '1.2.0-beta.0' ) ;
5656 } ) ;
5757 } ) ;
5858
59- describe ( 'getFirstGa' , ( ) => {
60- it ( 'throws if not release branch' , ( ) => {
59+ describe ( 'getFirstGa' , function ( ) {
60+ it ( 'throws if not release branch' , function ( ) {
6161 expect ( ( ) => {
6262 getFirstGa ( 'somebranch' ) ;
6363 } ) . to . throw ( 'not a release branch' ) ;
6464 } ) ;
6565
66- it ( 'returns the first beta for a release branch' , ( ) => {
66+ it ( 'returns the first beta for a release branch' , function ( ) {
6767 expect ( getFirstGa ( '1.22-releases' ) ) . to . equal ( '1.22.0' ) ;
6868 expect ( getFirstGa ( '1.2-releases' ) ) . to . equal ( '1.2.0' ) ;
6969 } ) ;
7070 } ) ;
7171
72- describe ( 'hasVersion' , ( ) => {
73- it ( 'returns true if matching' , ( ) => {
72+ describe ( 'hasVersion' , function ( ) {
73+ it ( 'returns true if matching' , function ( ) {
7474 expect (
7575 hasVersion ( '1.22-releases' , '1.22.0' )
7676 ) . to . be . true ;
@@ -84,7 +84,7 @@ describe('branches', () => {
8484 ) . to . be . true ;
8585 } ) ;
8686
87- it ( 'returns false if not matching' , ( ) => {
87+ it ( 'returns false if not matching' , function ( ) {
8888 expect (
8989 hasVersion ( '1.22-releases' , '1.21.0' )
9090 ) . to . be . false ;
@@ -103,8 +103,8 @@ describe('branches', () => {
103103 } ) ;
104104 } ) ;
105105
106- describe ( 'lt' , ( ) => {
107- it ( 'returns true only if branch is lower than version' , ( ) => {
106+ describe ( 'lt' , function ( ) {
107+ it ( 'returns true only if branch is lower than version' , function ( ) {
108108 expect ( lt ( '1.22-releases' , '1.23.0' ) ) . to . be . true ;
109109 expect ( lt ( '1.22-releases' , '2.0.0' ) ) . to . be . true ;
110110 expect ( lt ( '1.22-releases' , '2.22.0' ) ) . to . be . true ;
0 commit comments