@@ -47,47 +47,7 @@ describe('gitWorkflow', () => {
4747 ] . join ( '\n' )
4848 )
4949
50- await expect ( gitWorkflow . getBackupStash ( ctx ) ) . resolves . toEqual ( 'refs/stash@{1}' )
51- } )
52-
53- it ( 'should return unescaped ref to the backup stash when using MSYS2 without login shell' , async ( ) => {
54- const gitWorkflow = new GitWorkflow ( options )
55- const ctx = getInitialState ( )
56-
57- process . env . MSYSTEM = 'MSYS'
58-
59- execGit . mockResolvedValueOnce (
60- [
61- 'stash@{0}: some random stuff' ,
62- `stash@{1}: ${ STASH } ` ,
63- 'stash@{2}: other random stuff' ,
64- ] . join ( '\n' )
65- )
66-
67- await expect ( gitWorkflow . getBackupStash ( ctx ) ) . resolves . toEqual ( 'refs/stash@{1}' )
68-
69- delete process . env . MSYSTEM
70- } )
71-
72- it ( 'should return escaped ref to the backup stash when using MSYS2 with login shell' , async ( ) => {
73- const gitWorkflow = new GitWorkflow ( options )
74- const ctx = getInitialState ( )
75-
76- process . env . MSYSTEM = 'MSYS'
77- process . env . LOGINSHELL = 'bash'
78-
79- execGit . mockResolvedValueOnce (
80- [
81- 'stash@{0}: some random stuff' ,
82- `stash@{1}: ${ STASH } ` ,
83- 'stash@{2}: other random stuff' ,
84- ] . join ( '\n' )
85- )
86-
87- await expect ( gitWorkflow . getBackupStash ( ctx ) ) . resolves . toEqual ( 'refs/stash@\\{1\\}' )
88-
89- delete process . env . MSYSTEM
90- delete process . env . LOGINSHELL
50+ await expect ( gitWorkflow . getBackupStash ( ctx ) ) . resolves . toEqual ( '1' )
9151 } )
9252 } )
9353} )
0 commit comments