@@ -89,7 +89,7 @@ describe("createRerunSuggestion", () => {
89
89
} ) ;
90
90
91
91
expect ( actual ) . toMatchInlineSnapshot (
92
- `"npx create-typescript-app --base everything --author TestAuthor --description "Test description." --directory . -- email-github [email protected] --email-npm [email protected] --exclude-all-contributors --exclude-compliance --exclude-lint-jsdoc --exclude-lint-json --exclude-lint-knip --exclude-lint-package-json --exclude-lint-perfectionist --guide https://example.com --guide-title "Test Title" --keywords "abc def ghi jkl mno pqr" --mode initialize --owner TestOwner --repository test-repository --skip-github-api --skip-install --skip-removal --title "Test Title""` ,
92
+ `"npx create-typescript-app --base everything --author TestAuthor --description "Test description." --email-github [email protected] --email-npm [email protected] --exclude-all-contributors --exclude-compliance --exclude-lint-jsdoc --exclude-lint-json --exclude-lint-knip --exclude-lint-package-json --exclude-lint-perfectionist --guide https://example.com --guide-title "Test Title" --keywords "abc def ghi jkl mno pqr" --mode initialize --owner TestOwner --repository test-repository --skip-github-api --skip-install --skip-removal --title "Test Title""` ,
93
93
) ;
94
94
} ) ;
95
95
@@ -104,7 +104,31 @@ describe("createRerunSuggestion", () => {
104
104
} ) ;
105
105
106
106
expect ( actual ) . toMatchInlineSnapshot (
107
- `"npx create-typescript-app --base everything --author TestAuthor --description "Test description." --directory . --email-github [email protected] --email-npm [email protected] --exclude-all-contributors --exclude-compliance --exclude-lint-jsdoc --exclude-lint-json --exclude-lint-knip --exclude-lint-package-json --exclude-lint-perfectionist --keywords "abc def ghi jkl mno pqr" --logo test/src.png --logo-alt "Test alt." --mode initialize --owner TestOwner --repository test-repository --skip-github-api --skip-install --skip-removal --title "Test Title""` ,
107
+ `"npx create-typescript-app --base everything --author TestAuthor --description "Test description." --email-github [email protected] --email-npm [email protected] --exclude-all-contributors --exclude-compliance --exclude-lint-jsdoc --exclude-lint-json --exclude-lint-knip --exclude-lint-package-json --exclude-lint-perfectionist --keywords "abc def ghi jkl mno pqr" --logo test/src.png --logo-alt "Test alt." --mode initialize --owner TestOwner --repository test-repository --skip-github-api --skip-install --skip-removal --title "Test Title""` ,
108
+ ) ;
109
+ } ) ;
110
+
111
+ it ( "does not include directory when it is repository and the mode is create" , ( ) => {
112
+ const actual = createRerunSuggestion ( {
113
+ ...options ,
114
+ directory : options . repository ,
115
+ mode : "create" ,
116
+ } ) ;
117
+
118
+ expect ( actual ) . toMatchInlineSnapshot (
119
+ `"npx create-typescript-app --base everything --author TestAuthor --description "Test description." --email-github [email protected] --email-npm [email protected] --exclude-all-contributors --exclude-compliance --exclude-lint-jsdoc --exclude-lint-json --exclude-lint-knip --exclude-lint-package-json --exclude-lint-perfectionist --keywords "abc def ghi jkl mno pqr" --mode create --owner TestOwner --repository test-repository --skip-github-api --skip-install --skip-removal --title "Test Title""` ,
120
+ ) ;
121
+ } ) ;
122
+
123
+ it ( "includes directory when it is repository and the mode is migrate" , ( ) => {
124
+ const actual = createRerunSuggestion ( {
125
+ ...options ,
126
+ directory : options . repository ,
127
+ mode : "migrate" ,
128
+ } ) ;
129
+
130
+ expect ( actual ) . toMatchInlineSnapshot (
131
+ `"npx create-typescript-app --base everything --author TestAuthor --description "Test description." --directory test-repository --email-github [email protected] --email-npm [email protected] --exclude-all-contributors --exclude-compliance --exclude-lint-jsdoc --exclude-lint-json --exclude-lint-knip --exclude-lint-package-json --exclude-lint-perfectionist --keywords "abc def ghi jkl mno pqr" --mode migrate --owner TestOwner --repository test-repository --skip-github-api --skip-install --skip-removal --title "Test Title""` ,
108
132
) ;
109
133
} ) ;
110
134
@@ -118,7 +142,7 @@ describe("createRerunSuggestion", () => {
118
142
} ) ;
119
143
120
144
expect ( actual ) . toMatchInlineSnapshot (
121
- `"npx create-typescript-app --base everything --author TestAuthor --description "Test description." --directory . -- email-github [email protected] --email-npm [email protected] --exclude-all-contributors --exclude-compliance --exclude-lint-jsdoc --exclude-lint-json --exclude-lint-knip --exclude-lint-md --exclude-lint-package-json --exclude-lint-perfectionist --exclude-lint-spelling --keywords "abc def ghi jkl mno pqr" --mode initialize --owner TestOwner --repository test-repository --skip-github-api --skip-install --skip-removal --title "Test Title""` ,
145
+ `"npx create-typescript-app --base everything --author TestAuthor --description "Test description." --email-github [email protected] --email-npm [email protected] --exclude-all-contributors --exclude-compliance --exclude-lint-jsdoc --exclude-lint-json --exclude-lint-knip --exclude-lint-md --exclude-lint-package-json --exclude-lint-perfectionist --exclude-lint-spelling --keywords "abc def ghi jkl mno pqr" --mode initialize --owner TestOwner --repository test-repository --skip-github-api --skip-install --skip-removal --title "Test Title""` ,
122
146
) ;
123
147
} ) ;
124
148
0 commit comments