File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,18 @@ describe('alias set NUTs', () => {
66
66
expect ( result ) . to . deep . equal ( [ { alias : 'foo' , success : true , value : 'alias with spaces' } ] ) ;
67
67
} ) ;
68
68
69
+ it ( 'alias set with spaces in alias (produces warning)' , ( ) => {
70
+ const value = 'bar' ;
71
+ const result = execCmd ( `alias set "foo with space"=${ value } --json` , {
72
+ ensureExitCode : 0 ,
73
+ } ) . jsonOutput ;
74
+
75
+ expect ( result ?. result ) . to . deep . equal ( [ { alias : 'foo with space' , success : true , value } ] ) ;
76
+ expect ( result ?. warnings ) . to . deep . equal ( [
77
+ messages . getMessage ( 'warning.spaceAlias' , [ 'foo with space' , 'foo with space' ] ) ,
78
+ ] ) ;
79
+ } ) ;
80
+
69
81
it ( 'allow setting a single alias without an equal sign' , ( ) => {
70
82
const result = execCmd ( 'alias set theKey theValue --json' , {
71
83
ensureExitCode : 0 ,
You can’t perform that action at this time.
0 commit comments