OSMD.ts 517 B

12345678910111213141516171819202122
  1. import chai = require("chai");
  2. import {OSMD} from "../../../src/OSMD/OSMD";
  3. describe("OSMD Main Export", () => {
  4. it("no container", (done: MochaDone) => {
  5. chai.expect(() => {
  6. return new OSMD(undefined);
  7. }).to.throw(/container/);
  8. done();
  9. });
  10. it("container", (done: MochaDone) => {
  11. let div: HTMLElement = document.createElement("div");
  12. chai.expect(() => {
  13. return new OSMD(div);
  14. }).to.not.throw(Error);
  15. done();
  16. });
  17. });