Files
smartsystem/test/test.ts

21 lines
702 B
TypeScript
Raw Normal View History

import { tap, expect } from '@git.zone/tstest/tapbundle';
2022-07-28 22:07:52 +02:00
import * as smartsystem from '../ts/index.js';
import { systeminformation } from '../ts/smartsystem.plugins.js';
2016-10-12 14:01:15 +02:00
2019-08-22 01:05:21 +02:00
let smartsystemInstance: smartsystem.Smartsystem;
2016-10-12 14:01:15 +02:00
2021-08-12 23:35:39 +02:00
tap.test('should create a smartsystem instance', async (tools) => {
2019-08-22 01:05:21 +02:00
smartsystemInstance = new smartsystem.Smartsystem();
2022-07-28 22:07:52 +02:00
expect(smartsystemInstance).toBeInstanceOf(smartsystem.Smartsystem);
2019-08-22 01:05:21 +02:00
});
2017-07-31 15:16:10 +02:00
2019-08-22 01:05:21 +02:00
tap.test('should state the operating system', async () => {
2022-07-28 22:07:52 +02:00
expect(smartsystemInstance.cpus.length).toBeGreaterThan(0);
2019-08-22 01:05:21 +02:00
});
2017-05-13 11:03:24 +02:00
2019-09-08 15:56:50 +02:00
tap.test('should get systeminformation', async () => {
console.log(await smartsystemInstance.information.networkInterfaceDefault());
});
2019-08-22 01:05:21 +02:00
tap.start();