initial
This commit is contained in:
30
test/test.basic.ts
Normal file
30
test/test.basic.ts
Normal 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);
|
||||
});
|
||||
Reference in New Issue
Block a user