Skip to content
Robert Flack edited this page Apr 17, 2016 · 14 revisions

CIRC is written in JavaScript.

Building from source

  1. Clone or fork the git repo.
  2. Load the package directory as an unpacked Chrome extension (have to check the "developer mode" checkbox in chrome://extensions).

Making changes

After you make a change, reload the app. The easiest way to reload the app is to refresh the chrome://extensions page.

If you're having trouble understanding the codebase, be sure to check out the class diagram.

Testing

CIRC uses jasmine for its unit tests. The tests are written in Javascript and look like this:

describe("A notice", function() {
    var notice;
    beforeEach(function() {
      mocks.dom.setUp();
      return notice = new chat.Notice();
    });
    afterEach(function() {
      return mocks.dom.tearDown();
    });
    it("is initially hidden", function() {
      return expect(isVisible()).toBe(false);
    });

    it("becomes visible after prompt() is called", function() {
      notice.prompt("Device detected");
      return expect(isVisible()).toBe(true);
    });

    it("can be manually closed with close()", function() {
      notice.prompt("Device detected");
      notice.close();
      return expect(isVisible()).toBe(false);
    });
}).call(this);

Tests can be found in the /test directory.

To run CIRC tests, navigate to file:///path_to_circ/test/test_runner.html in Chrome.

Clone this wiki locally