This commit is contained in:
Shahrad Elahi
2023-12-22 00:34:07 +03:30
parent ac5275168c
commit 0dc9e89b6c
16 changed files with 156 additions and 85 deletions

18
web/tests/network.test.ts Normal file
View File

@@ -0,0 +1,18 @@
import Network from '$lib/network';
describe('Network', () => {
it('should return default interface', async () => {
const inet = await Network.defaultInterface();
console.log(inet);
});
it('should return in use ports', async () => {
const ports = await Network.inUsePorts();
console.log(ports);
});
it('should check interface exists', async () => {
const exists = await Network.interfaceExists('lo');
console.log(exists);
});
});

View File

@@ -0,0 +1,8 @@
import { generateWgKey } from '$lib/wireguard';
describe('Keys', () => {
it('should generate a key', async () => {
const keys = await generateWgKey();
console.log(keys);
});
});