diff --git a/src/test/system-test.js b/src/test/system-test.js index dda38139e..8c1515afd 100644 --- a/src/test/system-test.js +++ b/src/test/system-test.js @@ -76,9 +76,19 @@ describe('System', function () { expect(info.rebootRequired).to.be.a('boolean'); }); + it('can get block devices', async function () { + const devices = await system.getBlockDevices(); + expect(devices.some(d => d.mountpoint === '/')).to.be(true); + }); + + it('can get filesystems', async function () { + const filesystems = await system.getFilesystems(); + expect(filesystems.find(v => v.mountpoint === '/')).to.be.ok(); + }); + it('can get filesystemUsage', async function () { const filesystems = await system.getFilesystems(); - const rootFs = Object.values(filesystems).find(v => v.mountpoint === '/'); + const rootFs = filesystems.find(v => v.mountpoint === '/'); expect(rootFs.filesystem).to.be.ok(); const usageTask = await system.getFilesystemUsage(rootFs.filesystem);