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(() => {
1919} ) ;
2020
2121describe ( "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 ;
2424 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) ;
2626 } ) ;
2727
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" ;
3030 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) ;
3232 } ) ;
3333
3434 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 = () =>
9292 ) ;
9393
9494const 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" ) ;
9797 }
9898
9999 const guessedProviders = guessProviders ( ) ;
@@ -103,7 +103,7 @@ const guessBranch = (): string | undefined => {
103103 . map ( ( { name } ) => name )
104104 . join (
105105 ", "
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"`
107107 ) ;
108108 }
109109
You can’t perform that action at this time.
0 commit comments