feat: add story config
This commit is contained in:
+3
-3
@@ -15,9 +15,9 @@
|
||||
"build:sdk": "BUILD_MODE=library vite build",
|
||||
"prepare": "husky install",
|
||||
"size": "size-limit",
|
||||
"story:dev": "histoire dev",
|
||||
"story:build": "histoire build",
|
||||
"story:preview": "histoire preview"
|
||||
"story:dev": "BUILD_MODE=story histoire dev",
|
||||
"story:build": "BUILD_MODE=story histoire build",
|
||||
"story:preview": "BUILD_MODE=story histoire preview"
|
||||
},
|
||||
"size-limit": [
|
||||
{
|
||||
|
||||
@@ -13,29 +13,6 @@ const vueOptions = {
|
||||
|
||||
const testConfig = defineConfig({
|
||||
plugins: [vue(vueOptions)],
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
include: ['app/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
||||
coverage: {
|
||||
reporter: ['lcov', 'text'],
|
||||
include: ['app/**/*.js', 'app/**/*.vue'],
|
||||
exclude: [
|
||||
'app/**/*.@(spec|stories|routes).js',
|
||||
'**/specs/**/*',
|
||||
'**/i18n/**/*',
|
||||
],
|
||||
},
|
||||
globals: true,
|
||||
outputFile: 'coverage/sonar-report.xml',
|
||||
server: {
|
||||
deps: {
|
||||
inline: ['tinykeys', '@material/mwc-icon'],
|
||||
},
|
||||
},
|
||||
setupFiles: ['fake-indexeddb/auto', 'vitest.setup.js'],
|
||||
mockReset: true,
|
||||
clearMocks: true,
|
||||
},
|
||||
});
|
||||
|
||||
export default mergeConfig(baseConfig, testConfig);
|
||||
|
||||
@@ -13,6 +13,29 @@ const vueOptions = {
|
||||
|
||||
const testConfig = defineConfig({
|
||||
plugins: [vue(vueOptions)],
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
include: ['app/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
||||
coverage: {
|
||||
reporter: ['lcov', 'text'],
|
||||
include: ['app/**/*.js', 'app/**/*.vue'],
|
||||
exclude: [
|
||||
'app/**/*.@(spec|stories|routes).js',
|
||||
'**/specs/**/*',
|
||||
'**/i18n/**/*',
|
||||
],
|
||||
},
|
||||
globals: true,
|
||||
outputFile: 'coverage/sonar-report.xml',
|
||||
server: {
|
||||
deps: {
|
||||
inline: ['tinykeys', '@material/mwc-icon'],
|
||||
},
|
||||
},
|
||||
setupFiles: ['fake-indexeddb/auto', 'vitest.setup.js'],
|
||||
mockReset: true,
|
||||
clearMocks: true,
|
||||
},
|
||||
});
|
||||
|
||||
export default mergeConfig(baseConfig, testConfig);
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ if (isLibraryMode) {
|
||||
} else if (isTestMode) {
|
||||
config = import('./vite.config.test');
|
||||
} else if (isStoryMode) {
|
||||
config = import('./vite.config.dev');
|
||||
config = import('./vite.config.test');
|
||||
} else {
|
||||
config = import('./vite.config.dev');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user