mvoe mock, fix imports

This commit is contained in:
Loewy
2024-02-06 15:08:19 -08:00
parent b5ca868050
commit af28d5c65b
6 changed files with 6 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import { render } from "@testing-library/react-native";
import React from "react";
import BarGraph from "../../src/component/charts/bar-graph/bar-graph";
import { graph_data_two_measures } from "../../mock/charts/mock-data";
import { graph_data_two_measures } from "../mock/charts/mock-data";
describe("BarGraph Component Tests", () => {
it("renders correctly with data", () => {

View File

@@ -1,7 +1,7 @@
import { render } from "@testing-library/react-native";
import React from "react";
import LineGraph from "../../src/component/charts/line-graph/line-graph";
import { line_chart_two_y_data } from "../../mock/charts/mock-data";
import { line_chart_two_y_data } from "../mock/charts/mock-data";
describe("LineGraph Component Tests", () => {
it("renders correctly with data", () => {

View File

@@ -0,0 +1,64 @@
export const graph_data_one_measures = {
xValues: ["x_1", "x_2", "x_3", "x_4", "x_5"],
yValues: [
{
key: "measure_1",
values: [100, 140, 90, 80, 40],
},
],
};
export const graph_data_two_measures = {
xValues: ["x_1", "x_2", "x_3", "x_4", "x_5"],
yValues: [
{
key: "measure_1",
values: [100, 140, 90, 80, 40],
},
{
key: "measure_2",
values: [78, 82, 73, 56, 61],
formatLabel: (value: number) => `${value}%`,
},
],
};
export const graph_data_three_measures = {
xValues: ["x_1", "x_2", "x_3", "x_4", "x_5"],
yValues: [
{
key: "measure_1",
values: [100, 140, 90, 80, 40],
},
{
key: "measure_2",
values: [78, 82, 73, 56, 61],
formatLabel: (value: number) => `${value}%`,
},
{
key: "measure_3",
values: [77, 32, 45, 65, 50],
},
],
};
export const line_chart_one_y_data = {
xValues: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
yValues: [
{
key: "measure_1",
values: [100, 140, 90, 80, 40, 20, 70, 20, 30, 30],
},
],
};
export const line_chart_two_y_data = {
xValues: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
yValues: [
{
key: "measure_1",
values: [100, 140, 90, 80, 40, 20, 70, 20, 30, 30],
},
{
key: "measure_2",
values: [50, 67, 123, 140, 156, 147, 126, 180, 123, 87],
},
],
};