Adding base module tests
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adsooi 2024-10-12 05:31:42 +02:00
parent 4c1b705240
commit 974baa6cc2
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
5 changed files with 136 additions and 32 deletions

View file

@ -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())