Remove external df module

It has some parsing issues with locale
This commit is contained in:
Girish Ramakrishnan
2022-10-18 19:32:07 +02:00
parent 8b295fbfdb
commit 17c7cc5ec7
9 changed files with 105 additions and 196 deletions
+36
View File
@@ -0,0 +1,36 @@
/* jslint node:true */
/* global it:false */
/* global describe:false */
/* global before:false */
/* global after:false */
'use strict';
const common = require('./common.js'),
df = require('../df.js'),
expect = require('expect.js');
describe('System', function () {
const { setup, cleanup } = common;
before(setup);
after(cleanup);
it('can get disks', async function () {
// does not work on archlinux 8!
if (require('child_process').execSync('uname -a').toString().indexOf('-arch') !== -1) return;
const disks = await df.disks();
expect(disks).to.be.ok();
expect(disks.some(d => d.mountpoint === '/')).to.be.ok();
});
it('can get file', async function () {
// does not work on archlinux 8!
if (require('child_process').execSync('uname -a').toString().indexOf('-arch') !== -1) return;
const disks = await df.file(__dirname);
expect(disks).to.be.ok();
expect(disks.mountpoint).to.be('/home');
});
});