summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/themes/theme.test.ts
diff options
context:
space:
mode:
authorMiguel Solorio <[email protected]>2025-08-07 16:11:35 -0700
committerGitHub <[email protected]>2025-08-07 23:11:35 +0000
commit785ee5d59a60df89413d8f0dd1b7916279f6e786 (patch)
tree297ed9dc210070c349189018848a31f8ff802a3d /packages/cli/src/ui/themes/theme.test.ts
parent4f2974dbfe36638915f1b08448d2563c64f88644 (diff)
Use semantic colors in themes (#5796)
Co-authored-by: Jacob Richman <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/themes/theme.test.ts')
-rw-r--r--packages/cli/src/ui/themes/theme.test.ts50
1 files changed, 0 insertions, 50 deletions
diff --git a/packages/cli/src/ui/themes/theme.test.ts b/packages/cli/src/ui/themes/theme.test.ts
index c1e4dc00..6359a922 100644
--- a/packages/cli/src/ui/themes/theme.test.ts
+++ b/packages/cli/src/ui/themes/theme.test.ts
@@ -36,25 +36,6 @@ describe('validateCustomTheme', () => {
expect(result.error).toBeUndefined();
});
- it('should return isValid: false for a theme with a missing required field', () => {
- const invalidTheme = {
- ...validTheme,
- name: undefined as unknown as string,
- };
- const result = validateCustomTheme(invalidTheme);
- expect(result.isValid).toBe(false);
- expect(result.error).toBe('Missing required field: name');
- });
-
- it('should return isValid: false for a theme with an invalid color format', () => {
- const invalidTheme = { ...validTheme, Background: 'not-a-color' };
- const result = validateCustomTheme(invalidTheme);
- expect(result.isValid).toBe(false);
- expect(result.error).toBe(
- 'Invalid color format for Background: not-a-color',
- );
- });
-
it('should return isValid: false for a theme with an invalid name', () => {
const invalidTheme = { ...validTheme, name: ' ' };
const result = validateCustomTheme(invalidTheme);
@@ -71,37 +52,6 @@ describe('validateCustomTheme', () => {
expect(result.error).toBeUndefined();
});
- it('should return a warning if DiffAdded and DiffRemoved are missing', () => {
- const legacyTheme: Partial<CustomTheme> = { ...validTheme };
- delete legacyTheme.DiffAdded;
- delete legacyTheme.DiffRemoved;
- const result = validateCustomTheme(legacyTheme);
- expect(result.isValid).toBe(true);
- expect(result.warning).toBe('Missing field(s) DiffAdded, DiffRemoved');
- });
-
- it('should return a warning if only DiffRemoved is missing', () => {
- const legacyTheme: Partial<CustomTheme> = { ...validTheme };
- delete legacyTheme.DiffRemoved;
- const result = validateCustomTheme(legacyTheme);
- expect(result.isValid).toBe(true);
- expect(result.warning).toBe('Missing field(s) DiffRemoved');
- });
-
- it('should return isValid: false for a theme with an invalid DiffAdded color', () => {
- const invalidTheme = { ...validTheme, DiffAdded: 'invalid' };
- const result = validateCustomTheme(invalidTheme);
- expect(result.isValid).toBe(false);
- expect(result.error).toBe('Invalid color format for DiffAdded: invalid');
- });
-
- it('should return isValid: false for a theme with an invalid DiffRemoved color', () => {
- const invalidTheme = { ...validTheme, DiffRemoved: 'invalid' };
- const result = validateCustomTheme(invalidTheme);
- expect(result.isValid).toBe(false);
- expect(result.error).toBe('Invalid color format for DiffRemoved: invalid');
- });
-
it('should return isValid: false for a theme with a very long name', () => {
const invalidTheme = { ...validTheme, name: 'a'.repeat(51) };
const result = validateCustomTheme(invalidTheme);