system: cpu route

This commit is contained in:
Girish Ramakrishnan
2023-12-04 00:23:25 +01:00
parent d45c433bc7
commit 8a20b603f5
5 changed files with 33 additions and 1 deletions

View File

@@ -47,6 +47,12 @@ describe('System', function () {
expect(memory.swap).to.be.a('number');
});
it('can get CPUs', async function () {
const cpus = await system.getCpus();
expect(cpus).to.be.an(Array);
expect(cpus[0].model).to.be.a('string');
});
it('can get diskUsage', async function () {
const usage = await system.getDiskUsage();
expect(usage).to.be(null); // nothing cached