smartsystem/test/test.ts

21 lines
696 B
TypeScript
Raw Permalink Normal View History

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