@@ -56,6 +56,8 @@ describe("parseArgs", () => {
5656 it . effect ( "parses create command with defaults" , ( ) =>
5757 expectCreateCommand ( [ "create" , "--repo-url" , "https://github.com/org/repo.git" ] , ( command ) => {
5858 expectCreateDefaults ( command )
59+ expect ( command . openSsh ) . toBe ( false )
60+ expect ( command . waitForClone ) . toBe ( false )
5961 expect ( command . config . containerName ) . toBe ( "dg-repo" )
6062 expect ( command . config . serviceName ) . toBe ( "dg-repo" )
6163 expect ( command . config . volumeName ) . toBe ( "dg-repo-home" )
@@ -67,6 +69,8 @@ describe("parseArgs", () => {
6769 expect ( command . config . repoUrl ) . toBe ( "https://github.com/org/repo.git" )
6870 expect ( command . config . repoRef ) . toBe ( "issue-9" )
6971 expect ( command . outDir ) . toBe ( ".docker-git/org/repo/issue-9" )
72+ expect ( command . openSsh ) . toBe ( false )
73+ expect ( command . waitForClone ) . toBe ( false )
7074 expect ( command . config . containerName ) . toBe ( "dg-repo-issue-9" )
7175 expect ( command . config . serviceName ) . toBe ( "dg-repo-issue-9" )
7276 expect ( command . config . volumeName ) . toBe ( "dg-repo-issue-9-home" )
@@ -77,6 +81,8 @@ describe("parseArgs", () => {
7781 it . effect ( "parses clone command with positional repo url" , ( ) =>
7882 expectCreateCommand ( [ "clone" , "https://github.com/org/repo.git" ] , ( command ) => {
7983 expectCreateDefaults ( command )
84+ expect ( command . openSsh ) . toBe ( true )
85+ expect ( command . waitForClone ) . toBe ( true )
8086 expect ( command . config . targetDir ) . toBe ( "/home/dev/org/repo" )
8187 } ) )
8288
@@ -85,6 +91,16 @@ describe("parseArgs", () => {
8591 expect ( command . config . repoRef ) . toBe ( "feature-x" )
8692 } ) )
8793
94+ it . effect ( "supports disabling SSH auto-open for clone" , ( ) =>
95+ expectCreateCommand ( [ "clone" , "https://github.com/org/repo.git" , "--no-ssh" ] , ( command ) => {
96+ expect ( command . openSsh ) . toBe ( false )
97+ } ) )
98+
99+ it . effect ( "supports enabling SSH auto-open for create" , ( ) =>
100+ expectCreateCommand ( [ "create" , "--repo-url" , "https://github.com/org/repo.git" , "--ssh" ] , ( command ) => {
101+ expect ( command . openSsh ) . toBe ( true )
102+ } ) )
103+
88104 it . effect ( "parses force-env flag for clone" , ( ) =>
89105 expectCreateCommand ( [ "clone" , "https://github.com/org/repo.git" , "--force-env" ] , ( command ) => {
90106 expect ( command . force ) . toBe ( false )
0 commit comments