File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,16 @@ beforeEach(() => {
19
19
} ) ;
20
20
21
21
describe ( "guessBranch" , ( ) => {
22
- it ( "ensure the branch is guessed if ESLINT_PLUGIN_COMMIT is not already set" , async ( ) => {
23
- delete process . env . ESLINT_PLUGIN_COMMIT ;
22
+ it ( "ensure the branch is guessed if ESLINT_PLUGIN_DIFF_COMMIT is not already set" , async ( ) => {
23
+ delete process . env . ESLINT_PLUGIN_DIFF_COMMIT ;
24
24
const { guessBranch } = await import ( "./ci" ) ;
25
- expect ( ( ) => guessBranch ( ) ) . not . toThrowError ( / E S L I N T _ P L U G I N _ C O M M I T / u) ;
25
+ expect ( ( ) => guessBranch ( ) ) . not . toThrowError ( / E S L I N T _ P L U G I N _ D I F F _ C O M M I T / u) ;
26
26
} ) ;
27
27
28
- it ( "ensure the branch is not guessed if ESLINT_PLUGIN_COMMIT is already set" , async ( ) => {
29
- process . env . ESLINT_PLUGIN_COMMIT = "origin/main" ;
28
+ it ( "ensure the branch is not guessed if ESLINT_PLUGIN_DIFF_COMMIT is already set" , async ( ) => {
29
+ process . env . ESLINT_PLUGIN_DIFF_COMMIT = "origin/main" ;
30
30
const { guessBranch } = await import ( "./ci" ) ;
31
- expect ( ( ) => guessBranch ( ) ) . toThrowError ( / E S L I N T _ P L U G I N _ C O M M I T / u) ;
31
+ expect ( ( ) => guessBranch ( ) ) . toThrowError ( / E S L I N T _ P L U G I N _ D I F F _ C O M M I T / u) ;
32
32
} ) ;
33
33
34
34
it ( "fails when too many providers were found as candidates" , async ( ) => {
Original file line number Diff line number Diff line change @@ -92,8 +92,8 @@ const guessProviders = () =>
92
92
) ;
93
93
94
94
const guessBranch = ( ) : string | undefined => {
95
- if ( ( process . env . ESLINT_PLUGIN_COMMIT ?? "" ) . length > 0 ) {
96
- throw Error ( "ESLINT_PLUGIN_COMMIT already set" ) ;
95
+ if ( ( process . env . ESLINT_PLUGIN_DIFF_COMMIT ?? "" ) . length > 0 ) {
96
+ throw Error ( "ESLINT_PLUGIN_DIFF_COMMIT already set" ) ;
97
97
}
98
98
99
99
const guessedProviders = guessProviders ( ) ;
@@ -103,7 +103,7 @@ const guessBranch = (): string | undefined => {
103
103
. map ( ( { name } ) => name )
104
104
. join (
105
105
", "
106
- ) } ). Please specify your target branch explicitly instead, e.g. ESLINT_PLUGIN_COMMIT ="main"`
106
+ ) } ). Please specify your target branch explicitly instead, e.g. ESLINT_PLUGIN_DIFF_COMMIT ="main"`
107
107
) ;
108
108
}
109
109
You can’t perform that action at this time.
0 commit comments