feat(dashboard): close legacy parity gaps
This commit is contained in:
1 parent
92287c0a9a
commit
4b3f00729f
21 files changed
+397
-28
No files matched your search
@@ -10,6 +10,22 @@ function entry(id: string, level: 'debug' | 'info' | 'warn' | 'error', message:
|
||||
}
|
||||
|
||||
describe('live console state', () => {
|
||||
it('clears retained and paused entries without changing local controls', () => {
|
||||
const initial = {
|
||||
...createLiveConsoleState(5),
|
||||
entries: [entry('one', 'info', 'one')],
|
||||
pendingEntries: [entry('two', 'warn', 'two')],
|
||||
isPaused: true,
|
||||
search: 'needle',
|
||||
};
|
||||
|
||||
expect(reduceLiveConsoleState(initial, { type: 'clear' })).toEqual({
|
||||
...initial,
|
||||
entries: [],
|
||||
pendingEntries: [],
|
||||
});
|
||||
});
|
||||
|
||||
it('bounds entries, rejects duplicate IDs, and filters by level and search', () => {
|
||||
let state = createLiveConsoleState(2);
|
||||
state = reduceLiveConsoleState(state, { type: 'append', entry: entry('1', 'info', 'Sync started') });
|
||||
|
||||
Reference in new issue
Block a user