Skip to content

Commit

Permalink
Changed Calc of func test
Browse files Browse the repository at this point in the history
  • Loading branch information
RouKou76 committed Oct 17, 2024
1 parent a9ff55f commit c326ccf
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions rpgsaga/saga/tests/CalcOfFunc.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getTaskA, getTaskB } from "../src/CalcOfFunc";
import { getTaskA, getTaskB } from '../src/CalcOfFunc';

describe("TaskA", () => {
it("correct answer A", () => {
describe('TaskA', () => {
it('correct answer A', () => {
const expectedResult = [
1.1298385487203866,
1.7472761588502188,
Expand All @@ -13,18 +13,18 @@ describe("TaskA", () => {
const result = getTaskA(0.26, 0.66, 0.08);
expect(result).toEqual(expectedResult);
});
it("length returned array A", () => {
it('length returned array A', () => {
const ansverA = getTaskA(0, 4, 1);
expect(ansverA).toHaveLength(5);
});

it("checking empty array A", () => {
expect(getTaskA(1, 0, 0)).toEqual([]);
it('checking empty array A', () => {
expect(getTaskA(1, 0, 0)).toHaveLength(0);
});
});

describe("TaskB", () => {
it("correct answer B", () => {
describe('TaskB', () => {
it('correct answer B', () => {
const expectedResult = [
1.5347282613199904,
2.16507891445927,
Expand All @@ -35,12 +35,12 @@ describe("TaskB", () => {
const result = getTaskB([0.1, 0.35, 0.4, 0.55, 0.6]);
expect(result).toEqual(expectedResult);
});
it("length returned array B", () => {
it('length returned array B', () => {
const ansverB = getTaskB([0, 1, 2, 3, 4]);
expect(ansverB).toHaveLength(5);
});

it("checking empty array B", () => {
expect(getTaskB([])).toEqual([]);
it('checking empty array B', () => {
expect(getTaskB([])).toHaveLength(0);
});
});
});

0 comments on commit c326ccf

Please sign in to comment.