@agions/taroviz 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { getTheme, registerTheme, defaultTheme, darkTheme } from '../index';
1
+ import { getTheme, registerTheme, defaultTheme, darkTheme, getThemeByName } from '../index';
2
2
 
3
3
  describe('Theme System', () => {
4
4
  describe('getTheme', () => {
@@ -11,7 +11,7 @@ describe('Theme System', () => {
11
11
  const result = getTheme({ darkMode: true });
12
12
  expect(result.darkMode).toBe(true);
13
13
  expect(result.theme).toBe('dark');
14
- expect(result.backgroundColor).toBe('#0f1117');
14
+ expect(result.backgroundColor).toBe('#1a1a2e');
15
15
  });
16
16
 
17
17
  it('should merge custom options with defaultTheme', () => {
@@ -50,16 +50,10 @@ describe('Theme System', () => {
50
50
  });
51
51
 
52
52
  describe('registerTheme', () => {
53
- it('should log when registering a theme', () => {
54
- // Mock console.log
55
- const consoleSpy = jest.spyOn(console, 'log').mockImplementation();
56
-
53
+ it('should register a theme', () => {
57
54
  registerTheme('custom-theme', { backgroundColor: '#123' });
58
-
59
- expect(consoleSpy).toHaveBeenCalledWith('Registering theme: custom-theme');
60
-
61
- // Restore console.log
62
- consoleSpy.mockRestore();
55
+ const result = getThemeByName('custom-theme');
56
+ expect(result?.backgroundColor).toBe('#123');
63
57
  });
64
58
  });
65
59
 
@@ -70,8 +64,8 @@ describe('Theme System', () => {
70
64
  expect(defaultTheme).toHaveProperty('colors');
71
65
  expect(Array.isArray(defaultTheme.colors)).toBe(true);
72
66
  expect(defaultTheme.colors).toHaveLength(9);
73
- expect(defaultTheme).toHaveProperty('backgroundColor', 'transparent');
74
- expect(defaultTheme).toHaveProperty('textColor', '#333');
67
+ expect(defaultTheme).toHaveProperty('backgroundColor', '#ffffff');
68
+ expect(defaultTheme).toHaveProperty('textColor', '#333333');
75
69
  expect(defaultTheme).toHaveProperty('fontFamily');
76
70
  });
77
71
  });