cylon/spec/lib/cylon.spec.js

79 lines
1.8 KiB
JavaScript
Raw Normal View History

2014-03-06 04:46:41 +08:00
"use strict";
2013-10-25 05:25:42 +08:00
2015-06-23 09:10:09 +08:00
var Cylon = lib("../index");
2015-06-23 09:10:09 +08:00
var MCP = lib("mcp"),
API = lib("api"),
Robot = lib("robot"),
Driver = lib("driver"),
2015-06-23 09:10:09 +08:00
Adaptor = lib("adaptor"),
Utils = lib("utils"),
Config = lib("config"),
Logger = lib("logger");
2014-07-16 03:27:16 +08:00
2015-06-23 09:10:09 +08:00
var IO = {
DigitalPin: lib("io/digital-pin"),
Utils: lib("io/utils")
};
2015-06-23 09:10:09 +08:00
describe("Cylon", function() {
it("exports the MCP as Cylon.MCP", function() {
expect(Cylon.MCP).to.be.eql(MCP);
});
2015-06-23 09:10:09 +08:00
it("exports the Robot as Cylon.Robot", function() {
expect(Cylon.Robot).to.be.eql(Robot);
2014-02-28 05:54:04 +08:00
});
2015-06-23 09:10:09 +08:00
it("exports the Driver as Cylon.Driver", function() {
expect(Cylon.Driver).to.be.eql(Driver);
2014-02-28 05:54:04 +08:00
});
2014-02-28 09:39:02 +08:00
2015-06-23 09:10:09 +08:00
it("exports the Adaptor as Cylon.Adaptor", function() {
expect(Cylon.Adaptor).to.be.eql(Adaptor);
});
2014-03-10 10:17:40 +08:00
2015-06-23 09:10:09 +08:00
it("exports the Utils as Cylon.Utils", function() {
expect(Cylon.Utils).to.be.eql(Utils);
2014-03-10 10:17:40 +08:00
});
2014-03-10 10:18:45 +08:00
2015-06-23 09:10:09 +08:00
it("exports the Logger as Cylon.Logger", function() {
expect(Cylon.Logger).to.be.eql(Logger);
});
2015-06-23 09:10:09 +08:00
it("exports the IO DigitalPin and Utils as Cylon.IO", function() {
expect(Cylon.IO).to.be.eql(IO);
});
2015-06-23 09:10:09 +08:00
describe("#robot", function() {
it("proxies to MCP.create", function() {
expect(Cylon.robot).to.be.eql(MCP.create);
});
2015-06-23 09:10:09 +08:00
});
2015-06-23 09:10:09 +08:00
describe("#start", function() {
it("proxies to MCP.start", function() {
expect(Cylon.start).to.be.eql(MCP.start);
2014-09-16 05:46:24 +08:00
});
});
describe("#halt", function() {
2015-06-23 09:10:09 +08:00
it("proxies to MCP.halt", function() {
expect(Cylon.halt).to.be.eql(MCP.halt);
2014-03-10 10:18:45 +08:00
});
});
2014-07-16 03:27:16 +08:00
2015-06-23 09:10:09 +08:00
describe("#api", function() {
it("proxies to API.create", function() {
expect(Cylon.api).to.be.eql(API.create);
2014-12-16 01:37:52 +08:00
});
2015-06-23 09:10:09 +08:00
});
2015-06-23 09:10:09 +08:00
describe("#config", function() {
it("proxies to Config.update", function() {
expect(Cylon.config).to.be.eql(Config.update);
});
2014-07-16 03:27:16 +08:00
});
2014-02-28 05:54:04 +08:00
});