UNPKG

cylon-octanis1-rover

Version:

Cylon module for Octanis 1 Rover

23 lines (19 loc) 619 B
"use strict"; var Utils = lib("utils"), Mraa = lib("mraa"); describe("Utils", function() { describe("#isGalileoGen1", function() { it("checks the platform type", function() { expect(Utils.isGalileoGen1()).to.be.eql(false); }); }); describe("#i2cPortFor", function() { it("returns the correct i2c port for the current platform", function() { expect(Utils.i2cPortFor()).to.be.eql(0); stub(Mraa, "getPlatformType").returns(2); expect(Utils.i2cPortFor()).to.be.eql(6); expect(Mraa.getPlatformType).to.be.called; Mraa.getPlatformType.restore(); }); }); });