mirror of
https://github.com/epistemic-technology/co-intelligence.git
synced 2026-07-22 16:40:33 +00:00
Create Obsidian API mock (test/mocks/obsidian.ts) and test setup with String.prototype.contains polyfill. Add tests for all utility functions and core services: notes serialization/deserialization, URL helpers, model context, model registry, and model service. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8 lines
271 B
TypeScript
8 lines
271 B
TypeScript
import "@testing-library/jest-dom/vitest";
|
|
|
|
// Obsidian adds .contains() to String.prototype. Polyfill it for tests.
|
|
if (!String.prototype.contains) {
|
|
String.prototype.contains = function (searchString: string): boolean {
|
|
return this.includes(searchString);
|
|
};
|
|
}
|