This commit is contained in:
2026-02-24 12:29:58 +00:00
commit 3fad287a29
58 changed files with 3999 additions and 0 deletions

30
test/test.basic.ts Normal file
View File

@@ -0,0 +1,30 @@
import { assertEquals, assertExists } from 'https://deno.land/std@0.208.0/assert/mod.ts';
import { BaseProvider, GiteaProvider, GitLabProvider } from '../ts/providers/index.ts';
import { ConnectionManager } from '../ts/classes/connectionmanager.ts';
import { GitopsApp } from '../ts/classes/gitopsapp.ts';
Deno.test('GiteaProvider instantiates correctly', () => {
const provider = new GiteaProvider('test-id', 'https://gitea.example.com', 'test-token');
assertExists(provider);
assertEquals(provider.connectionId, 'test-id');
assertEquals(provider.baseUrl, 'https://gitea.example.com');
});
Deno.test('GitLabProvider instantiates correctly', () => {
const provider = new GitLabProvider('test-id', 'https://gitlab.example.com', 'test-token');
assertExists(provider);
assertEquals(provider.connectionId, 'test-id');
assertEquals(provider.baseUrl, 'https://gitlab.example.com');
});
Deno.test('ConnectionManager instantiates correctly', () => {
const manager = new ConnectionManager();
assertExists(manager);
});
Deno.test('GitopsApp instantiates correctly', () => {
const app = new GitopsApp();
assertExists(app);
assertExists(app.connectionManager);
assertExists(app.opsServer);
});