- Add vitest configuration with coverage reporting - Create test setup file with DOM mocks - Add tests for state management, helpers, and tool configurations - Update tsconfig and package.json for testing support - Clean up unused comments and improve code style
17 lines
419 B
TypeScript
17 lines
419 B
TypeScript
export const state = {
|
|
activeTool: null,
|
|
files: [],
|
|
pdfDoc: null,
|
|
pdfPages: [],
|
|
currentPdfUrl: null,
|
|
};
|
|
|
|
// Resets the state when switching views or completing an operation.
|
|
export function resetState() {
|
|
state.activeTool = null;
|
|
state.files = [];
|
|
state.pdfDoc = null;
|
|
state.pdfPages = [];
|
|
state.currentPdfUrl = null;
|
|
document.getElementById('tool-content').innerHTML = '';
|
|
} |