First iwlist draft handling ubuntu and raspberry pi outputs

This commit is contained in:
Christian Kuster
2016-04-06 06:50:54 +02:00
parent cc7b23aec1
commit 76ab975521
4 changed files with 209 additions and 0 deletions

31
test/iwlist.js Normal file
View File

@ -0,0 +1,31 @@
/**
* iwlist tests
* Created by kc on 05.04.16.
*/
const fs = require('fs');
const path = require('path');
const assert = require('assert');
const iwlist = require('../lib/iwlist');
describe('iwlist', () => {
it('parses the output of file 1', function(done) {
iwlist.parseOutput(fs.readFileSync(path.join(__dirname, 'fixtures','iwlist','iwlist01_ubuntu1404.txt'), { encoding: 'utf8' }), (err, info) => {
console.log(info);
assert.ok(info);
done(err);
});
});
it('parses the output of file 2', function(done) {
iwlist.parseOutput(fs.readFileSync(path.join(__dirname, 'fixtures','iwlist','iwlist02_raspi.txt'), { encoding: 'utf8' }), (err, info) => {
console.log(info);
assert.ok(info);
done(err);
});
});
});