Adding base module tests
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4c1b705240
commit
974baa6cc2
5 changed files with 136 additions and 32 deletions
|
@ -33,9 +33,16 @@ import { MockDialog } from "../mock/dialog.mjs"
|
|||
import { MockRootElement } from "../mock/root.mjs"
|
||||
import { MockCanvas } from "../mock/canvas.mjs"
|
||||
|
||||
describe("Interface", function() {
|
||||
describe("Interfaces", function() {
|
||||
describe("#interface methods", function() {
|
||||
it("throws an error when called directly", function() {
|
||||
const obj = new CanvasInterface()
|
||||
expect(() => obj.markDirty()).to.throw(Error)
|
||||
})
|
||||
})
|
||||
|
||||
describe("#checkImplementation", function() {
|
||||
it("should validate the implementation of mocks", function() {
|
||||
it("validates the implementation of mocks", function() {
|
||||
const checkMockLatex = () => Interface.checkImplementation(LatexInterface, new MockLatex())
|
||||
const checkMockHelper = () => Interface.checkImplementation(HelperInterface, new MockHelper())
|
||||
const checkMockDialog = () => Interface.checkImplementation(DialogInterface, new MockDialog())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue