refactor(formula): keep other formula commands in engine

This commit is contained in:
hexf00
2026-07-28 21:35:50 +08:00
parent 86d7e1d7ce
commit 964daada42
2 changed files with 0 additions and 5 deletions
@@ -15,7 +15,6 @@
*/
import { ICommandService } from '@univerjs/core';
import { OtherFormulaMarkDirty } from '@univerjs/engine-formula';
import { afterEach, describe, expect, it } from 'vitest';
import { InsertFunctionCommand } from '../../commands/commands/insert-function.command';
import { QuickSumCommand } from '../../commands/commands/quick-sum.command';
@@ -33,13 +32,11 @@ describe('FormulaController', () => {
expect(commandService.hasCommand(InsertFunctionCommand.id)).toBe(false);
expect(commandService.hasCommand(QuickSumCommand.id)).toBe(false);
expect(commandService.hasCommand(OtherFormulaMarkDirty.id)).toBe(false);
testBed.injector.get(FormulaController);
expect(commandService.hasCommand(InsertFunctionCommand.id)).toBe(true);
expect(commandService.hasCommand(QuickSumCommand.id)).toBe(true);
expect(commandService.hasCommand(OtherFormulaMarkDirty.id)).toBe(true);
testBed.univer.dispose();
});
@@ -15,7 +15,6 @@
*/
import { Disposable, ICommandService } from '@univerjs/core';
import { OtherFormulaMarkDirty } from '@univerjs/engine-formula';
import { InsertFunctionCommand } from '../commands/commands/insert-function.command';
import { QuickSumCommand } from '../commands/commands/quick-sum.command';
@@ -28,7 +27,6 @@ export class FormulaController extends Disposable {
[
InsertFunctionCommand,
QuickSumCommand,
OtherFormulaMarkDirty,
].forEach((c) => this._commandService.registerCommand(c));
}
}