Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const defaultTemplates: Template[] = [
description: "A starter template for Patternfly react typescript project",
repo: "https://github.com/patternfly/patternfly-react-seed.git",
repoSSH: "git@github.com:patternfly/patternfly-react-seed.git",
packageManager: "yarn"
options: ["--single-branch", "--branch", "main"],
packageManager: "npm"
Comment on lines +22 to +23
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Update the failing create.test.ts test to match the new starter packageManager.

The existing test uses template packageManager and runs install in src/__tests__/create.test.ts (lines 221–232) asserts that runCreate(projectDir, 'starter') invokes execa with 'yarn'. Switching starter to packageManager: "npm" here will cause that test to fail. Please update the assertion to expect 'npm' (or re-point the test at compass-starter/nextjs-starter if the intent is to keep a yarn-based check).

🧪 Suggested test update
-    expect(mockExeca).toHaveBeenNthCalledWith(
-      2,
-      'yarn',
-      ['install'],
-      expect.objectContaining({ cwd: projectPath, stdio: 'inherit' })
-    );
+    expect(mockExeca).toHaveBeenNthCalledWith(
+      2,
+      'npm',
+      ['install'],
+      expect.objectContaining({ cwd: projectPath, stdio: 'inherit' })
+    );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/templates.ts` around lines 22 - 23, The test failure is caused by the
starter template switching to packageManager: "npm"; update the test in
src/__tests__/create.test.ts that asserts the runtime installer, so that the
assertion for runCreate(projectDir, 'starter') expects execa to be invoked with
'npm' instead of 'yarn' (or alternatively change the test to call a yarn-based
template like 'compass-starter'/'nextjs-starter'); modify the expectation that
inspects execa calls in the “uses template packageManager and runs install” test
to match the new packageManager value for the 'starter' template.

},
{
name: "compass-starter",
Expand Down
Loading