|
1 | | -jest.mock('inquirer', () => ({ |
2 | | - __esModule: true, |
3 | | - default: { prompt: jest.fn() }, |
4 | | -})); |
5 | | - |
6 | 1 | import path from 'path'; |
7 | 2 | import fs from 'fs-extra'; |
8 | 3 | import { loadCustomTemplates, mergeTemplates } from '../template-loader.js'; |
9 | 4 | import templates from '../templates.js'; |
10 | | -import { sanitizeRepoName } from '../github.js'; |
11 | 5 |
|
12 | 6 | const fixturesDir = path.join(process.cwd(), 'src', '__tests__', 'fixtures'); |
13 | 7 |
|
@@ -152,20 +146,3 @@ describe('mergeTemplates', () => { |
152 | 146 | } |
153 | 147 | }); |
154 | 148 | }); |
155 | | - |
156 | | -describe('GitHub support (create command)', () => { |
157 | | - it('derives repo name from package name the same way the create command does', () => { |
158 | | - // Create command uses sanitizeRepoName(pkgJson.name) for initial repo name |
159 | | - expect(sanitizeRepoName('my-app')).toBe('my-app'); |
160 | | - expect(sanitizeRepoName('@patternfly/my-project')).toBe('my-project'); |
161 | | - expect(sanitizeRepoName('My Project Name')).toBe('my-project-name'); |
162 | | - }); |
163 | | - |
164 | | - it('builds repo URL in the format used by the create command', () => { |
165 | | - // Create command builds https://github.com/${auth.username}/${repoName} |
166 | | - const username = 'testuser'; |
167 | | - const repoName = sanitizeRepoName('@org/my-package'); |
168 | | - const repoUrl = `https://github.com/${username}/${repoName}`; |
169 | | - expect(repoUrl).toBe('https://github.com/testuser/my-package'); |
170 | | - }); |
171 | | -}); |
0 commit comments