Remove external df module
It has some parsing issues with locale
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user