mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-15 16:17:58 +00:00
some sanity checks on the final interface
This commit is contained in:
parent
50fdb7db8f
commit
a9c8927a52
1 changed files with 23 additions and 0 deletions
23
Tone/index.test.ts
Normal file
23
Tone/index.test.ts
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import * as Tone from "./index";
|
||||||
|
import { expect } from "chai";
|
||||||
|
import { Destination } from "./core/context/Destination";
|
||||||
|
import { Context } from "./core/context/Context";
|
||||||
|
import { Transport } from "./core/clock/Transport";
|
||||||
|
import { Draw } from "./core/util/Draw";
|
||||||
|
|
||||||
|
describe("Tone", () => {
|
||||||
|
|
||||||
|
it("has 'now' and 'immediate' methods", () => {
|
||||||
|
expect(Tone.now).to.be.a("function");
|
||||||
|
expect(Tone.now()).to.be.a("number");
|
||||||
|
expect(Tone.immediate).to.be.a("function");
|
||||||
|
expect(Tone.immediate()).to.be.a("number");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("exports the global singletons", () => {
|
||||||
|
expect(Tone.Destination).to.be.an.instanceOf(Destination);
|
||||||
|
expect(Tone.Draw).to.be.an.instanceOf(Draw);
|
||||||
|
expect(Tone.Transport).to.be.an.instanceOf(Transport);
|
||||||
|
expect(Tone.context).to.be.an.instanceOf(Context);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in a new issue