Unnest client tests

This commit is contained in:
Jonatan Kłosko 2024-02-02 17:39:28 +08:00
parent 1b1f352f29
commit 85c8b3e7ec
3 changed files with 349 additions and 355 deletions

View file

@ -1,6 +1,5 @@
import Delta from "../../js/lib/delta";
describe("Delta", () => {
describe("compose", () => {
test("insert with insert", () => {
const a = new Delta().insert("A");
@ -329,4 +328,3 @@ describe("Delta", () => {
expect(delta.transformPosition(4)).toEqual(1);
});
});
});

View file

@ -1,6 +1,5 @@
import Emitter from "../../js/lib/emitter";
describe("Emitter", () => {
test("listener callbacks are called on dispatch", () => {
const emitter = new Emitter();
const callback1 = jest.fn();
@ -24,4 +23,3 @@ describe("Emitter", () => {
expect(callback1).not.toHaveBeenCalled();
});
});

View file

@ -1,6 +1,5 @@
import PubSub from "../../js/lib/pubsub";
describe("PubSub", () => {
test("subscribed callback is called on the specified topic", () => {
const pubsub = new PubSub();
const callback1 = jest.fn();
@ -24,4 +23,3 @@ describe("PubSub", () => {
expect(callback1).not.toHaveBeenCalled();
});
});