MCPcopy
hub / github.com/tinymce/tinymce / checkWithManager

Function checkWithManager

modules/tinymce/src/core/test/ts/browser/EditorTest.ts:553–565  ·  view source on GitHub ↗
(title: string, plugins: string, plugin: string, addToManager: boolean, expected: boolean)

Source from the content-addressed store, hash-verified

551 };
552
553 const checkWithManager = (title: string, plugins: string, plugin: string, addToManager: boolean, expected: boolean) => {
554 const editor = hook.editor();
555 if (addToManager) {
556 PluginManager.add('ParticularPlugin', Fun.noop);
557 }
558
559 editor.options.set('plugins', plugins.split(/[ ,]/));
560 assert.equal(editor.hasPlugin(plugin, true), expected, title);
561
562 if (addToManager) {
563 PluginManager.remove('ParticularPlugin');
564 }
565 };
566
567 it('TINY-766: Checking without requiring a plugin to be loaded', () => {
568 checkWithoutManager('Plugin does not exist', 'Plugin Is Not Here', 'ParticularPlugin', false);

Callers 1

EditorTest.tsFile · 0.85

Calls 4

setMethod · 0.80
hasPluginMethod · 0.80
addMethod · 0.65
removeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…