-
-
Notifications
You must be signed in to change notification settings - Fork 180
test: correct import specifier casing #831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughFour Nuxt test spec files were edited to change component import paths from 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
| import { describe, expect, it } from 'vitest' | ||
| import { mountSuspended } from '@nuxt/test-utils/runtime' | ||
| import ComparisonGrid from '~/components/Compare/ComparisonGrid.vue' | ||
| import ComparisonGrid from '~/components/compare/ComparisonGrid.vue' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the actual directory structure for compare components
echo "=== Checking for 'compare' directory (lowercase) ==="
fd -t d -i '^compare$' components 2>/dev/null || echo "No results"
echo ""
echo "=== Checking for 'Compare' directory (uppercase) ==="
fd -t d '^Compare$' components 2>/dev/null || echo "No results"
echo ""
echo "=== Listing all directories under components ==="
fd -t d . components --max-depth 2 2>/dev/null || echo "No components directory"
echo ""
echo "=== Looking for ComparisonGrid.vue file ==="
fd -t f 'ComparisonGrid.vue' 2>/dev/null || echo "No results"
echo ""
echo "=== Checking components directory exists ==="
if [ -d "components" ]; then
ls -la components/ | head -20
else
echo "components directory not found"
fiRepository: npmx-dev/npmx.dev
Length of output: 427
🏁 Script executed:
#!/bin/bash
# Check the actual structure and alias configuration
echo "=== Looking for configuration files ==="
fd -t f 'nuxt\\.config\\.(ts|js)' . --max-depth 2
fd -t f 'tsconfig\\.json' . --max-depth 2
echo ""
echo "=== Show current app structure ==="
if [ -d "app" ]; then
echo "Contents of app/:"
ls -la app/ | head -15
fi
echo ""
echo "=== Verify the actual file path ==="
if [ -f "app/components/Compare/ComparisonGrid.vue" ]; then
echo "✓ File exists at: app/components/Compare/ComparisonGrid.vue"
head -5 app/components/Compare/ComparisonGrid.vue
fi
echo ""
echo "=== Check test file location and current imports ==="
if [ -f "test/nuxt/components/compare/ComparisonGrid.spec.ts" ]; then
echo "Test file exists. First few lines:"
head -10 test/nuxt/components/compare/ComparisonGrid.spec.ts
fiRepository: npmx-dev/npmx.dev
Length of output: 1529
Correct the import path casing to match the actual directory name.
The component exists at app/components/Compare/ComparisonGrid.vue (with uppercase "Compare"), but the import uses lowercase compare. Change the import to:
import ComparisonGrid from '~/components/Compare/ComparisonGrid.vue'
🧰 Tools
🪛 GitHub Check: test
[failure] 3-3:
Cannot find module '~/components/compare/ComparisonGrid.vue' or its corresponding type declarations.
This trips typescript up. The directory is `compare`, not `Compare`.
30f6724 to
66fdb86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
| import { ref } from 'vue' | ||
| import { mountSuspended } from '@nuxt/test-utils/runtime' | ||
| import PackageSelector from '~/components/Compare/PackageSelector.vue' | ||
| import PackageSelector from '~/components/compare/PackageSelector.vue' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find the component file
fd -t f 'PackageSelector\.vue' . 2>/dev/null
# Find compare directories (case-insensitive search)
fd -t d 'compare' . 2>/dev/null | grep -E '(components|compare)'
# Check for Nuxt and TypeScript configuration
fd -t f -e 'nuxt.config.ts' -e 'nuxt.config.js' -e 'tsconfig.json' . 2>/dev/null
# Check if components directory exists and its contents
ls -la src/components/compare/ 2>/dev/null || ls -la components/compare/ 2>/dev/null || echo "No components/compare found"Repository: npmx-dev/npmx.dev
Length of output: 191
🏁 Script executed:
#!/bin/bash
# Check directory structure at root
ls -la . | head -20
# List all top-level directories
find . -maxdepth 1 -type d | sortRepository: npmx-dev/npmx.dev
Length of output: 1455
🏁 Script executed:
#!/bin/bash
# Check Nuxt config files
cat nuxt.config.ts 2>/dev/null | head -50
# Check tsconfig.json
cat tsconfig.json 2>/dev/null | grep -A 10 '"paths"' || echo "No paths found in tsconfig"
# Verify the exact directory casing
ls -la app/components/ | grep -i compareRepository: npmx-dev/npmx.dev
Length of output: 1589
🏁 Script executed:
#!/bin/bash
# Check if there's an app.config.ts or similar
fd -t f 'nuxt.config\|app\.config' . 2>/dev/null | head -5
# Verify directory structure
tree -L 3 app/components/ 2>/dev/null || find app/components -maxdepth 3 -type fRepository: npmx-dev/npmx.dev
Length of output: 2268
Correct import path to match directory casing.
The component directory is Compare (capital C), not compare. Change line 4 to:
import PackageSelector from '~/components/Compare/PackageSelector.vue'
On case-sensitive file systems (Linux CI), the current lowercase path fails to resolve the module.
🧰 Tools
🪛 GitHub Check: test
[failure] 4-4:
Cannot find module '~/components/compare/PackageSelector.vue' or its corresponding type declarations.
|
closing #814 has broken the repo for anyone on macos who had it cloned before that merged not sure what advice to give yet, will chase up on discord |
This trips typescript up. The directory is
compare, notCompare.