uci-i2c-bus/test/bus.test.js

24 lines
474 B
JavaScript
Raw Normal View History

'use strict'
const chai = require('chai'),
chaiAsPromised = require("chai-as-promised"),
2017-01-16 22:44:10 -08:00
Bus = require('../lib/bus').Bus
2017-01-16 22:44:10 -08:00
chai.use(chaiAsPromised)
const expect = chai.expect
let bus = new Bus()
2017-01-16 22:44:10 -08:00
// const addresses = [0x20, 0x26, 0x27]
const addresses = []
describe('Bus Class - ', function () {
it('Can scan the bus for devices', function () {
return expect(bus.scan().catch(err => console.log("an error", err))).to.eventually.deep.equal(addresses)
})
2017-01-15 18:47:43 -08:00
})