(title: string, plugins: string, plugin: string, addToManager: boolean, expected: boolean)
| 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); |
no test coverage detected
searching dependent graphs…