Improve type safety in name test form and theme test

This commit is contained in:
jxxghp
2026-07-31 15:14:38 +08:00
parent c957264b72
commit 38fe17ab99
2 changed files with 10 additions and 2 deletions

View File

@@ -1,10 +1,11 @@
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { cwd } from 'node:process'
import { describe, expect, it } from 'vitest'
describe('text-moviepilot theme color', () => {
it('derives its gradient from the active Vuetify primary color', () => {
const commonStyles = readFileSync(resolve(process.cwd(), 'src/styles/common.scss'), 'utf8')
const commonStyles = readFileSync(resolve(cwd(), 'src/styles/common.scss'), 'utf8')
const textMoviePilotRule = commonStyles.match(/\.text-moviepilot\s*\{(?<rule>[\s\S]*?)\n\}/)?.groups?.rule
expect(textMoviePilotRule).toContain('var(--v-theme-primary)')