mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Add basic DittoConfig tests
This commit is contained in:
parent
13db5498a5
commit
1e5278dc8c
1 changed files with 19 additions and 0 deletions
19
packages/config/DittoConfig.test.ts
Normal file
19
packages/config/DittoConfig.test.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { assertEquals } from '@std/assert';
|
||||||
|
|
||||||
|
import { DittoConfig } from './DittoConfig.ts';
|
||||||
|
|
||||||
|
Deno.test('DittoConfig', async (t) => {
|
||||||
|
const env = new Map<string, string>([
|
||||||
|
['DITTO_NSEC', 'nsec19shyxpuzd0cq2p5078fwnws7tyykypud6z205fzhlmlrs2vpz6hs83zwkw'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
const config = new DittoConfig(env);
|
||||||
|
|
||||||
|
await t.step('nsec', () => {
|
||||||
|
assertEquals(config.nsec, 'nsec19shyxpuzd0cq2p5078fwnws7tyykypud6z205fzhlmlrs2vpz6hs83zwkw');
|
||||||
|
});
|
||||||
|
|
||||||
|
await t.step('pubkey', () => {
|
||||||
|
assertEquals(config.pubkey, '1ba0c5ed1bbbf3b7eb0d7843ba16836a0201ea68a76bafcba507358c45911ff6');
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Add table
Reference in a new issue