Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit eb9237e

Browse files
fix(vuetify-cli): resolve test folder path logic
1 parent cbcb489 commit eb9237e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/vue-cli-plugin-vuetify-cli/generator/templates/component/Component.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Component
2-
import Component from '../components/index'
2+
import Component from '../index'
33

44
// Utilities
55
import { shallow, createLocalVue } from '@vue/test-utils'

packages/vue-cli-plugin-vuetify-cli/util/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ async function * parseDir (dir, options, api) {
7575
}
7676

7777
for (const { name, data } of getFiles(template)) {
78-
const fileDir = name === `${dir}.spec.js`
78+
const fileDir = name.split('.')[1] === 'spec'
7979
? dir === 'component' && ['base/', 'regular/'].includes(type)
8080
? path.join(directory, '..', type, '__tests__')
81-
: path.join(directory, '__tests__')
81+
: path.join(directory, '..', '__tests__')
8282
: directory
8383
yield {
8484
directory: fileDir,

0 commit comments

Comments
 (0)