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 Sep 9, 2024
1 parent 9182d9e commit b29574d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/engine-formula/src/functions/lookup/drop/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ export class Drop extends BaseFunction {
}

private _getResultArray(array: BaseValueObject, rows: number, columns: number, arrayRowCount: number, arrayColumnCount: number): BaseValueObject {
if (!array.isArray()) {
return array;
}

const rowParam = rows >= 0 ? [rows, arrayRowCount] : [0, arrayRowCount + rows];
const columnParam = columns >= 0 ? [columns, arrayColumnCount] : [0, arrayColumnCount + columns];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ describe('Test expand function', () => {
[ErrorType.VALUE, ErrorType.VALUE],
[ErrorType.VALUE, ErrorType.VALUE],
]);

const result7 = testFunction.calculate(array2, rows, columns);
expect(getObjectValue(result7)).toStrictEqual(1);
});

it('Rows value test', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ describe('Test take function', () => {
[ErrorType.VALUE, ErrorType.VALUE],
[ErrorType.VALUE, ErrorType.VALUE],
]);

const result7 = testFunction.calculate(array2, rows, columns);
expect(getObjectValue(result7)).toStrictEqual(1);
});

it('Rows value test', async () => {
Expand Down

0 comments on commit b29574d

Please sign in to comment.