mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-06 19:08:57 +09:00
c6836d0abb
Migrates the last four Options API components, so all 20 `.vue` files
now use `<script setup>`, and disables the Vue Options API runtime. This
will enable optimizations like Vue Vapor mode in the future.
Bug fixes done while migrating and testing:
- Branch selector: arrowing onto "Create branch …" threw a `TypeError`,
and Enter on it did nothing
- Dashboard: the search term was not escaped, so `&` injected query
parameters and `#` truncated the request
- Dashboard: an unknown `repo-search-filter` threw, and names like
`constructor` leaked `Object.prototype` members into the request
- Dashboard: an unknown archived/private filter rendered `function
Object() { [native code] }` as a checkbox tooltip
- Dashboard: removed a dropdown init that always ran against a
not-yet-rendered element
- Branch selector: the `document.body` click listener was never removed
on unmount
- Contributors: the chart plugin relied on an undeclared chart.js field
- Contributors: `contributorsStats` was mutated behind a `shallowRef`,
so future readers would not update
- Removed template attributes and pageData keys that no component had
read for years
---------
Signed-off-by: silverwind <me@silverwind.io>
26 lines
569 B
TypeScript
26 lines
569 B
TypeScript
import {defineConfig} from 'vitest/config';
|
|
import {sharedPlugins, vueDefines} from './tools/shared.ts';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
include: [
|
|
'web_src/**/*.test.ts',
|
|
'tools/eslint-rules/**/*.test.ts',
|
|
],
|
|
setupFiles: ['web_src/js/vitest.setup.ts'],
|
|
environment: 'happy-dom',
|
|
testTimeout: 20000,
|
|
open: false,
|
|
allowOnly: true,
|
|
passWithNoTests: true,
|
|
globals: true,
|
|
watch: false,
|
|
isolate: false,
|
|
sequence: {
|
|
concurrent: true,
|
|
},
|
|
},
|
|
define: vueDefines,
|
|
plugins: sharedPlugins(),
|
|
});
|