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 23, 2024
1 parent 09a1a19 commit fb94503
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,23 @@ describe('Test betadist function', () => {
const B = NumberValueObject.create(3);
const result = testFunction.calculate(x, alpha, beta, A, B);
expect(getObjectValue(result)).toBe(ErrorType.NAME);

const x2 = NumberValueObject.create(2);
const alpha2 = ErrorValueObject.create(ErrorType.NAME);
const result2 = testFunction.calculate(x2, alpha2, beta, A, B);
expect(getObjectValue(result2)).toBe(ErrorType.NAME);

const beta2 = ErrorValueObject.create(ErrorType.NAME);
const result3 = testFunction.calculate(x2, alpha, beta2, A, B);
expect(getObjectValue(result3)).toBe(ErrorType.NAME);

const A2 = ErrorValueObject.create(ErrorType.NAME);
const result4 = testFunction.calculate(x2, alpha, beta, A2, B);
expect(getObjectValue(result4)).toBe(ErrorType.NAME);

const B2 = ErrorValueObject.create(ErrorType.NAME);
const result5 = testFunction.calculate(x2, alpha, beta, A, B2);
expect(getObjectValue(result5)).toBe(ErrorType.NAME);
});

it('Value is array', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ describe('Test lognormdist function', () => {
const standardDev = NumberValueObject.create(4);
const result = testFunction.calculate(x, mean, standardDev);
expect(getObjectValue(result)).toBe(ErrorType.NAME);

const x2 = NumberValueObject.create(15.2069);
const mean2 = ErrorValueObject.create(ErrorType.NAME);
const result2 = testFunction.calculate(x2, mean2, standardDev);
expect(getObjectValue(result2)).toBe(ErrorType.NAME);

const standardDev2 = ErrorValueObject.create(ErrorType.NAME);
const result3 = testFunction.calculate(x2, mean, standardDev2);
expect(getObjectValue(result3)).toBe(ErrorType.NAME);
});

it('Value is array', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ describe('Test negbinomdist function', () => {
const probabilityS = NumberValueObject.create(0.5);
const result = testFunction.calculate(numberF, numberS, probabilityS);
expect(getObjectValue(result)).toBe(ErrorType.NAME);

const numberF2 = NumberValueObject.create(6);
const numberS2 = ErrorValueObject.create(ErrorType.NAME);
const result2 = testFunction.calculate(numberF2, numberS2, probabilityS);
expect(getObjectValue(result2)).toBe(ErrorType.NAME);

const probabilityS2 = ErrorValueObject.create(ErrorType.NAME);
const result3 = testFunction.calculate(numberF2, numberS, probabilityS2);
expect(getObjectValue(result3)).toBe(ErrorType.NAME);
});

it('Value is array', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ describe('Test tdist function', () => {
const tails = NumberValueObject.create(1);
const result = testFunction.calculate(x, degFreedom, tails);
expect(getObjectValue(result)).toBe(ErrorType.NAME);

const x2 = NumberValueObject.create(1);
const degFreedom2 = ErrorValueObject.create(ErrorType.NAME);
const result2 = testFunction.calculate(x2, degFreedom2, tails);
expect(getObjectValue(result2)).toBe(ErrorType.NAME);

const tails2 = ErrorValueObject.create(ErrorType.NAME);
const result3 = testFunction.calculate(x2, degFreedom, tails2);
expect(getObjectValue(result3)).toBe(ErrorType.NAME);
});

it('Value is array', () => {
Expand Down

0 comments on commit fb94503

Please sign in to comment.