Skip to content

Commit

Permalink
Create customization.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Dec 3, 2024
1 parent fb1a2b0 commit c2cc84f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/customization.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// tests/customization.test.js
const SettingsManager = require('../customization/settings');
const ThemeManager = require('../customization/themes');

describe('Customization Module', () => {
let settingsManager;
let themeManager;

beforeEach(() => {
settingsManager = new SettingsManager();
themeManager = new ThemeManager();
});

test('should create user settings correctly', () => {
const userSettings = settingsManager.createUserSettings('user123');
expect(userSettings.getSettings()).toHaveProperty('language', 'en');
});

test('should add a new theme correctly', () => {
const theme = themeManager.addTheme('Dark Mode', { backgroundColor: '#000', textColor: '#fff' });
expect(theme.name).toBe('Dark Mode');
});
});

0 comments on commit c2cc84f

Please sign in to comment.