mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 09:52:36 +02:00
Fix typo
This commit is contained in:
parent
5f6447e261
commit
90acad6670
|
@ -354,7 +354,7 @@ export default class Tools extends Module {
|
|||
* @param tool — Block Tool
|
||||
*/
|
||||
private assignBlockTunesToBlockTool(tool: BlockTool): void {
|
||||
if (tool.enabledInlineTools === false) {
|
||||
if (tool.enabledBlockTunes === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ describe('Tools module', () => {
|
|||
class: class {} as any,
|
||||
inlineToolbar: true,
|
||||
},
|
||||
blockToolWithoutSettings: class {} as any,
|
||||
inlineTool: class {
|
||||
public static isInline = true
|
||||
|
||||
|
@ -204,6 +205,14 @@ describe('Tools module', () => {
|
|||
expect(Array.from(module.blockTools.values()).every(tool => tool.isBlock())).to.be.true;
|
||||
});
|
||||
|
||||
it('Block Tools should contain default tunes if no settings is specified', () => {
|
||||
const tool = module.blockTools.get('blockToolWithoutSettings');
|
||||
|
||||
expect(tool.tunes.has('deleteTune')).to.be.true;
|
||||
expect(tool.tunes.has('moveUpTune')).to.be.true;
|
||||
expect(tool.tunes.has('moveDownTune')).to.be.true;
|
||||
});
|
||||
|
||||
it('Block Tools should contain default tunes', () => {
|
||||
const tool = module.blockTools.get('blockTool');
|
||||
|
||||
|
|
Loading…
Reference in a new issue