From af28d5c65b75e814d1bc1fc3da3e6a0158b9db5d Mon Sep 17 00:00:00 2001 From: Loewy Date: Tue, 6 Feb 2024 15:08:19 -0800 Subject: [PATCH] mvoe mock, fix imports --- src/App.tsx => App.tsx | 4 ++-- index.js | 2 +- src/screens/session.tsx | 2 +- test/component/bar-graph.test.tsx | 2 +- test/component/line-graph.test.tsx | 2 +- {mock => test/mock}/charts/mock-data.ts | 0 6 files changed, 6 insertions(+), 6 deletions(-) rename src/App.tsx => App.tsx (89%) rename {mock => test/mock}/charts/mock-data.ts (100%) diff --git a/src/App.tsx b/App.tsx similarity index 89% rename from src/App.tsx rename to App.tsx index 6d8beec..5d69b5f 100644 --- a/src/App.tsx +++ b/App.tsx @@ -1,6 +1,6 @@ import React, { useEffect } from "react"; -import { ClientProvider, useAuthHeader } from "./graphql/client"; -import AppNavigator from "./navigation/app-navigator"; +import { ClientProvider, useAuthHeader } from "./src/graphql/client"; +import AppNavigator from "./src/navigation/app-navigator"; import { DEV_USER_ID } from "@env"; import AsyncStorage from "@react-native-async-storage/async-storage"; diff --git a/index.js b/index.js index fc82eb1..828b356 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ import { registerRootComponent } from "expo"; -import App from "./src/App"; +import App from "./App"; // registerRootComponent calls AppRegistry.registerComponent('main', () => App); // It also ensures that whether you load the app in Expo Go or in a native build, diff --git a/src/screens/session.tsx b/src/screens/session.tsx index 3bb0bee..432a4a1 100644 --- a/src/screens/session.tsx +++ b/src/screens/session.tsx @@ -1,7 +1,7 @@ import React from "react"; import { StyleSheet, View } from "react-native"; import BarGraph from "../component/charts/bar-graph/bar-graph"; -import { graph_data_two_measures } from "../../mock/charts/mock-data"; +import { graph_data_two_measures } from "../../test/mock/charts/mock-data"; // Session Mock - can be used for session summary screen using a query handler component // BarGraph component using mocked data currently diff --git a/test/component/bar-graph.test.tsx b/test/component/bar-graph.test.tsx index 071f5f2..5391154 100644 --- a/test/component/bar-graph.test.tsx +++ b/test/component/bar-graph.test.tsx @@ -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", () => { diff --git a/test/component/line-graph.test.tsx b/test/component/line-graph.test.tsx index 3fab5d9..5c1e745 100644 --- a/test/component/line-graph.test.tsx +++ b/test/component/line-graph.test.tsx @@ -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", () => { diff --git a/mock/charts/mock-data.ts b/test/mock/charts/mock-data.ts similarity index 100% rename from mock/charts/mock-data.ts rename to test/mock/charts/mock-data.ts