feat(dm): add dashboard with oauth, dice, initiative, open5e, notes

This commit is contained in:
emil
2026-05-14 23:48:36 +03:00
parent 7efe188a9a
commit 1a092e05c1
144 changed files with 8643 additions and 35 deletions
+29
View File
@@ -0,0 +1,29 @@
import { describe, it, expect, beforeEach } from 'vitest';
import { saveNotes, loadNotes, clearNotes } from '../src/lib/client/notes';
describe('Notes', () => {
beforeEach(() => {
localStorage.clear();
});
it('saves notes to localStorage', () => {
saveNotes('Test note');
expect(loadNotes()).toBe('Test note');
});
it('loads empty string when no notes saved', () => {
expect(loadNotes()).toBe('');
});
it('clears notes', () => {
saveNotes('Test');
clearNotes();
expect(loadNotes()).toBe('');
});
it('overwrites existing notes', () => {
saveNotes('First');
saveNotes('Second');
expect(loadNotes()).toBe('Second');
});
});