Example #1
0
export function setupTestQuill(): Quill {
    registerQuill();
    document.body.innerHTML = `<form class="FormWrapper"><div id='quill' class="richEditor"></div></form>`;
    const mountPoint = document.getElementById("quill")!;
    const options = {
        theme: "vanilla",
    };
    const quill = new Quill(mountPoint, options);
    window.quill = quill;
    return quill;
}
Example #2
0
 before(() => {
     registerQuill();
 });
Example #3
0
/**
 * @author Adam Charron <*****@*****.**>
 * @copyright 2009-2019 Vanilla Forums Inc.
 * @license GPL-2.0-only
 */

import Enzyme from "enzyme";
import Adapter from "enzyme-adapter-react-16";
import { importAll } from "@library/__tests__/utility";
import reducerRegistry from "@library/redux/reducerRegistry";
import editorReducer from "@rich-editor/state/editorReducer";
import registerQuill from "@rich-editor/quill/registerQuill";

// Setup enzyme
Enzyme.configure({ adapter: new Adapter() });
reducerRegistry.register("editor", editorReducer);
registerQuill();
importAll((require as any).context("..", true, /.test.(ts|tsx)$/));