mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-08-21 16:32:35 +08:00
Improve type safety in name test form and theme test
This commit is contained in:
@@ -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)')
|
||||
|
||||
Reference in New Issue
Block a user