mirror of
https://github.com/podman-desktop/podman-desktop
synced 2026-04-21 09:37:22 +00:00
refactor(tools): simplify vitest config (#12108)
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
This commit is contained in:
parent
9673091998
commit
56696165ce
3 changed files with 9 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/**********************************************************************
|
||||
* Copyright (C) 2024 Red Hat, Inc.
|
||||
* Copyright (C) 2024-2025 Red Hat, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -25,11 +25,9 @@ import tailwindcss from '@tailwindcss/vite';
|
|||
|
||||
import { defineConfig } from 'vite';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { coverageConfig } from '../vitest-shared-extensions.config';
|
||||
|
||||
let filename = fileURLToPath(import.meta.url);
|
||||
const PACKAGE_ROOT = path.dirname(filename);
|
||||
const PACKAGE_NAME = 'storybook';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
|
|
@ -49,7 +47,6 @@ export default defineConfig({
|
|||
deps: {
|
||||
inline: ['moment'],
|
||||
},
|
||||
...coverageConfig(PACKAGE_ROOT, PACKAGE_NAME),
|
||||
},
|
||||
base: '',
|
||||
server: {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**********************************************************************
|
||||
* Copyright (C) 2023 Red Hat, Inc.
|
||||
* Copyright (C) 2023-2025 Red Hat, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -53,6 +53,10 @@ const config = {
|
|||
emptyOutDir: true,
|
||||
reportCompressedSize: false,
|
||||
},
|
||||
test: {
|
||||
environment: 'node',
|
||||
include: ['src/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**********************************************************************
|
||||
* Copyright (C) 2023 Red Hat, Inc.
|
||||
* Copyright (C) 2023-2025 Red Hat, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -23,8 +23,8 @@ const PACKAGE_NAME = 'website';
|
|||
|
||||
const config = {
|
||||
test: {
|
||||
...testConfig(),
|
||||
...coverageConfig(PACKAGE_ROOT, PACKAGE_NAME),
|
||||
environment: 'node',
|
||||
include: ['*.{test,spec}.?(c|m)[jt]s?(x)'],
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue