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

24 lines
474 B
JavaScript

'use strict'
const chai = require('chai'),
chaiAsPromised = require("chai-as-promised"),
Bus = require('../lib/bus').Bus
chai.use(chaiAsPromised)
const expect = chai.expect
let bus = new Bus()
// 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)
})
})