From 0c59435a2bd738cf168e0eba35630d35feb43635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dandelion=20Man=C3=A9?= Date: Tue, 8 May 2018 17:03:01 -0700 Subject: [PATCH] Move testUtil.js into src/app (#248) testUtil contains some useful configuration endpoints for our frontend testing. This commit moves it out of the artifact editor and up to `src/app`. Test plan: `yarn travis` passes. --- src/{plugins/artifact/editor => app}/testUtil.js | 0 src/plugins/artifact/editor/App.test.js | 2 +- src/plugins/artifact/editor/ArtifactGraphEditor.test.js | 4 ++-- src/plugins/artifact/editor/ContributionList.test.js | 4 ++-- .../artifact/editor/adapters/githubPluginAdapter.test.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename src/{plugins/artifact/editor => app}/testUtil.js (100%) diff --git a/src/plugins/artifact/editor/testUtil.js b/src/app/testUtil.js similarity index 100% rename from src/plugins/artifact/editor/testUtil.js rename to src/app/testUtil.js diff --git a/src/plugins/artifact/editor/App.test.js b/src/plugins/artifact/editor/App.test.js index 5419a36..2cae219 100644 --- a/src/plugins/artifact/editor/App.test.js +++ b/src/plugins/artifact/editor/App.test.js @@ -3,7 +3,7 @@ import React from "react"; import ReactDOM from "react-dom"; import App from "./App"; -require("./testUtil").configureAphrodite(); +require("../../../app/testUtil").configureAphrodite(); // Check that PropTypes check out. it("renders without crashing", () => { diff --git a/src/plugins/artifact/editor/ArtifactGraphEditor.test.js b/src/plugins/artifact/editor/ArtifactGraphEditor.test.js index 3f92d59..3103abe 100644 --- a/src/plugins/artifact/editor/ArtifactGraphEditor.test.js +++ b/src/plugins/artifact/editor/ArtifactGraphEditor.test.js @@ -7,8 +7,8 @@ import {Graph} from "../../../core/graph"; import {ArtifactGraphEditor} from "./ArtifactGraphEditor"; import {artifactAddress} from "../artifactPlugin"; -require("./testUtil").configureAphrodite(); -require("./testUtil").configureEnzyme(); +require("../../../app/testUtil").configureAphrodite(); +require("../../../app/testUtil").configureEnzyme(); describe("ArtifactGraphEditor", () => { function createComponent(onChange) { diff --git a/src/plugins/artifact/editor/ContributionList.test.js b/src/plugins/artifact/editor/ContributionList.test.js index bd057d9..29eadb0 100644 --- a/src/plugins/artifact/editor/ContributionList.test.js +++ b/src/plugins/artifact/editor/ContributionList.test.js @@ -12,8 +12,8 @@ import {AdapterSet} from "./adapterSet"; import {ContributionList} from "./ContributionList"; import {Graph} from "../../../core/graph"; -require("./testUtil").configureAphrodite(); -require("./testUtil").configureEnzyme(); +require("../../../app/testUtil").configureAphrodite(); +require("../../../app/testUtil").configureEnzyme(); function createTestData(): * { type PayloadA = number; diff --git a/src/plugins/artifact/editor/adapters/githubPluginAdapter.test.js b/src/plugins/artifact/editor/adapters/githubPluginAdapter.test.js index 4cd204d..833ba32 100644 --- a/src/plugins/artifact/editor/adapters/githubPluginAdapter.test.js +++ b/src/plugins/artifact/editor/adapters/githubPluginAdapter.test.js @@ -9,7 +9,7 @@ import {parse} from "../../../github/parser"; import exampleRepoData from "../../../github/demoData/example-github.json"; import adapter from "./githubPluginAdapter"; -require("../testUtil").configureEnzyme(); +require("../../../../app/testUtil").configureEnzyme(); describe("githubPluginAdapter", () => { it("operates on the example repo", () => {