mirror of
https://github.com/dream-num/univer.git
synced 2026-08-31 01:42:03 +08:00
refactor(formula): keep other formula commands in engine
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user