diff --git a/test/specs/grapesjs/index.js b/test/specs/grapesjs/index.js index 813e237c5..0dd725512 100644 --- a/test/specs/grapesjs/index.js +++ b/test/specs/grapesjs/index.js @@ -229,6 +229,22 @@ describe('GrapesJS', () => { expect(editor.getDevice()).toEqual('Tablet'); }); + it('Init new editor with custom plugin override default commands', () => { + var editor, + pluginName = 'test-plugin-opts'; + + obj.plugins.add(pluginName, (edt, opts) => { + let cmdm = edt.Commands; + // Overwrite export template + cmdm.add('export-template', {test: 1}); + }); + config.plugins = [pluginName]; + + editor = obj.init(config); + editor.Commands.init() + expect(editor.Commands.get('export-template').test).toEqual(1); + }); + }); });