Adds unit tests for core functionalities

Adds comprehensive unit tests to improve code coverage for core functionalities: constants, paper size mapping, modal settings, security utilities, temporary directory management, and variable mapping.

This ensures that basic functionalities work as expected and enhances the reliability of the plugin.

Additionally, this commit includes a mock Obsidian API to facilitate testing in a non-Obsidian environment.
This commit is contained in:
AlexKucera committed 2025-11-05 08:03:24 +01:00
1 parent 4a0376ec2b
commit 7ac9e1f489
10 files changed
+1494

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import { describe, it, expect } from 'vitest';
import { ExportFormat } from '../src/core/settings';
// Type definition file - basic import test to ensure types compile
describe('converterTypes', () => {
it('should export ExportFormat enum', () => {
expect(ExportFormat.Standard).toBe('standard');
expect(ExportFormat.SinglePage).toBe('single-page');
});
});