mirror of
https://github.com/codex-team/editor.js
synced 2026-03-18 00:19:53 +01:00
Fix typo
This commit is contained in:
parent
5f6447e261
commit
90acad6670
2 changed files with 10 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue