Skip to content

Commit

Permalink
fix(formula): fix codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
wpxp123456 authored and wpxp123456 committed Oct 17, 2024
1 parent 018bba4 commit 8537d90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ describe('Test substitute function', () => {
const instanceNum5 = NumberValueObject.create(2.5);
const result5 = testFunction.calculate(text, oldText, newText, instanceNum5);
expect(getObjectValue(result5)).toStrictEqual('Hello Univer');

const instanceNum6 = NumberValueObject.create(-1);
const result6 = testFunction.calculate(text, oldText, newText, instanceNum6);
expect(getObjectValue(result6)).toStrictEqual(ErrorType.VALUE);

const instanceNum7 = NumberValueObject.create(1);
const result7 = testFunction.calculate(text, oldText, newText, instanceNum7);
expect(getObjectValue(result7)).toStrictEqual('Hi Univer');
});

it('Value is array', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/

import type { ArrayValueObject } from '../../../engine/value-object/array-value-object';
import type { NumberValueObject } from '../../../engine/value-object/primitive-object';
import { ErrorType } from '../../../basics/error-type';
import { expandArrayValueObject } from '../../../engine/utils/array-object';
import { type BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
import { StringValueObject } from '../../../engine/value-object/primitive-object';
import { BaseFunction } from '../../base-function';
import type { ArrayValueObject } from '../../../engine/value-object/array-value-object';
import type { NumberValueObject } from '../../../engine/value-object/primitive-object';

export class Substitute extends BaseFunction {
override minParams = 3;
Expand Down

0 comments on commit 8537d90

Please sign in to comment.