mirror of
https://github.com/status-im/sourcecred.git
synced 2025-02-28 20:20:35 +00:00
Collect web-related utilities in webutil/
(#970)
I'm planning to pull `credExplorer` out of `app` and into its own top-level module. This is a bit awkward, as `credExplorer` depends on a lot of little modules that are currently collected in `app/`. To resolve this, I pull all of these little utility modules into `webutil/`. It's not a totally principled grouping, but it's quite convenient and keeps these rarely changing modules out of the way. Test plan: It's a file move, `yarn test` suffices.
This commit is contained in:
parent
b077bd8179
commit
c997f4e1ec
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import Link from "./Link";
|
import Link from "../webutil/Link";
|
||||||
|
|
||||||
export default class ExternalRedirect extends React.Component<{|
|
export default class ExternalRedirect extends React.Component<{|
|
||||||
+redirectTo: string,
|
+redirectTo: string,
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import type {Assets} from "./assets";
|
import type {Assets} from "../webutil/assets";
|
||||||
import Link from "./Link";
|
import Link from "../webutil/Link";
|
||||||
|
|
||||||
export default class HomePage extends React.Component<{|+assets: Assets|}> {
|
export default class HomePage extends React.Component<{|+assets: Assets|}> {
|
||||||
render() {
|
render() {
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
import React, {type Node} from "react";
|
import React, {type Node} from "react";
|
||||||
import {StyleSheet, css} from "aphrodite/no-important";
|
import {StyleSheet, css} from "aphrodite/no-important";
|
||||||
|
|
||||||
import type {Assets} from "./assets";
|
import type {Assets} from "../webutil/assets";
|
||||||
import Colors from "./Colors";
|
import Colors from "../webutil/Colors";
|
||||||
import Link from "./Link";
|
import Link from "../webutil/Link";
|
||||||
import GithubLogo from "./GithubLogo";
|
import GithubLogo from "./GithubLogo";
|
||||||
import TwitterLogo from "./TwitterLogo";
|
import TwitterLogo from "./TwitterLogo";
|
||||||
import DiscordLogo from "./DiscordLogo";
|
import DiscordLogo from "./DiscordLogo";
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import {Graph, type NodeAddressT, type EdgeAddressT} from "../../core/graph";
|
import {Graph, type NodeAddressT, type EdgeAddressT} from "../../core/graph";
|
||||||
import {NodeTrie, EdgeTrie} from "../../core/trie";
|
import {NodeTrie, EdgeTrie} from "../../core/trie";
|
||||||
import type {Assets} from "../assets";
|
import type {Assets} from "../../webutil/assets";
|
||||||
import type {RepoId} from "../../core/repoId";
|
import type {RepoId} from "../../core/repoId";
|
||||||
|
|
||||||
import type {StaticAppAdapter, DynamicAppAdapter} from "./appAdapter";
|
import type {StaticAppAdapter, DynamicAppAdapter} from "./appAdapter";
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
fallbackNodeType,
|
fallbackNodeType,
|
||||||
fallbackEdgeType,
|
fallbackEdgeType,
|
||||||
} from "../../analysis/fallbackDeclaration";
|
} from "../../analysis/fallbackDeclaration";
|
||||||
import {Assets} from "../assets";
|
import {Assets} from "../../webutil/assets";
|
||||||
import {makeRepoId} from "../../core/repoId";
|
import {makeRepoId} from "../../core/repoId";
|
||||||
|
|
||||||
describe("app/adapters/adapterSet", () => {
|
describe("app/adapters/adapterSet", () => {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import {type Node as ReactNode} from "react";
|
import {type Node as ReactNode} from "react";
|
||||||
import {Graph, type NodeAddressT} from "../../core/graph";
|
import {Graph, type NodeAddressT} from "../../core/graph";
|
||||||
import type {Assets} from "../assets";
|
import type {Assets} from "../../webutil/assets";
|
||||||
import type {RepoId} from "../../core/repoId";
|
import type {RepoId} from "../../core/repoId";
|
||||||
import type {PluginDeclaration} from "../../analysis/pluginDeclaration";
|
import type {PluginDeclaration} from "../../analysis/pluginDeclaration";
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import type {
|
|||||||
StaticAppAdapter,
|
StaticAppAdapter,
|
||||||
DynamicAppAdapter,
|
DynamicAppAdapter,
|
||||||
} from "../../app/adapters/appAdapter";
|
} from "../../app/adapters/appAdapter";
|
||||||
import {Assets} from "../../app/assets";
|
import {Assets} from "../../webutil/assets";
|
||||||
import {type RepoId} from "../../core/repoId";
|
import {type RepoId} from "../../core/repoId";
|
||||||
import {Graph, NodeAddress, type NodeAddressT} from "../../core/graph";
|
import {Graph, NodeAddress, type NodeAddressT} from "../../core/graph";
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import {IndexRoute, Route} from "react-router";
|
|||||||
|
|
||||||
import Page from "./Page";
|
import Page from "./Page";
|
||||||
import ExternalRedirect from "./ExternalRedirect";
|
import ExternalRedirect from "./ExternalRedirect";
|
||||||
import withAssets from "./withAssets";
|
import withAssets from "../webutil/withAssets";
|
||||||
import {routeData} from "./routeData";
|
import {routeData} from "./routeData";
|
||||||
|
|
||||||
export function createRoutes() {
|
export function createRoutes() {
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import type {Assets} from "../assets";
|
import type {Assets} from "../../webutil/assets";
|
||||||
import type {LocalStore} from "../localStore";
|
import type {LocalStore} from "../../webutil/localStore";
|
||||||
import CheckedLocalStore from "../checkedLocalStore";
|
import CheckedLocalStore from "../../webutil/checkedLocalStore";
|
||||||
import BrowserLocalStore from "../browserLocalStore";
|
import BrowserLocalStore from "../../webutil/browserLocalStore";
|
||||||
import Link from "../Link";
|
import Link from "../../webutil/Link";
|
||||||
|
|
||||||
import {defaultStaticAdapters} from "../adapters/defaultPlugins";
|
import {defaultStaticAdapters} from "../adapters/defaultPlugins";
|
||||||
import {PagerankTable} from "./pagerankTable/Table";
|
import {PagerankTable} from "./pagerankTable/Table";
|
||||||
|
@ -5,8 +5,8 @@ import {shallow} from "enzyme";
|
|||||||
|
|
||||||
import {Graph} from "../../core/graph";
|
import {Graph} from "../../core/graph";
|
||||||
import {makeRepoId} from "../../core/repoId";
|
import {makeRepoId} from "../../core/repoId";
|
||||||
import {Assets} from "../assets";
|
import {Assets} from "../../webutil/assets";
|
||||||
import testLocalStore from "../testLocalStore";
|
import testLocalStore from "../../webutil/testLocalStore";
|
||||||
import {DynamicAdapterSet, StaticAdapterSet} from "../adapters/adapterSet";
|
import {DynamicAdapterSet, StaticAdapterSet} from "../adapters/adapterSet";
|
||||||
import {FactorioStaticAdapter} from "../../plugins/demo/appAdapter";
|
import {FactorioStaticAdapter} from "../../plugins/demo/appAdapter";
|
||||||
import {defaultWeightsForAdapter} from "./weights/weights";
|
import {defaultWeightsForAdapter} from "./weights/weights";
|
||||||
@ -17,7 +17,7 @@ import {createApp, LoadingIndicator} from "./App";
|
|||||||
import {uninitializedState} from "./state";
|
import {uninitializedState} from "./state";
|
||||||
import {Prefix as GithubPrefix} from "../../plugins/github/nodes";
|
import {Prefix as GithubPrefix} from "../../plugins/github/nodes";
|
||||||
|
|
||||||
require("../testUtil").configureEnzyme();
|
require("../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/App", () => {
|
describe("app/credExplorer/App", () => {
|
||||||
function example() {
|
function example() {
|
||||||
|
@ -5,8 +5,8 @@ import sortBy from "lodash.sortby";
|
|||||||
import deepEqual from "lodash.isequal";
|
import deepEqual from "lodash.isequal";
|
||||||
|
|
||||||
import * as NullUtil from "../../util/null";
|
import * as NullUtil from "../../util/null";
|
||||||
import type {LocalStore} from "../localStore";
|
import type {LocalStore} from "../../webutil/localStore";
|
||||||
import type {Assets} from "../assets";
|
import type {Assets} from "../../webutil/assets";
|
||||||
|
|
||||||
import {fromJSON, REPO_ID_REGISTRY_API} from "./repoIdRegistry";
|
import {fromJSON, REPO_ID_REGISTRY_API} from "./repoIdRegistry";
|
||||||
import {type RepoId, stringToRepoId, repoIdToString} from "../../core/repoId";
|
import {type RepoId, stringToRepoId, repoIdToString} from "../../core/repoId";
|
||||||
|
@ -3,7 +3,7 @@ import React from "react";
|
|||||||
import {shallow, mount} from "enzyme";
|
import {shallow, mount} from "enzyme";
|
||||||
|
|
||||||
import * as NullUtil from "../../util/null";
|
import * as NullUtil from "../../util/null";
|
||||||
import testLocalStore from "../testLocalStore";
|
import testLocalStore from "../../webutil/testLocalStore";
|
||||||
import RepositorySelect, {
|
import RepositorySelect, {
|
||||||
PureRepositorySelect,
|
PureRepositorySelect,
|
||||||
LocalStoreRepositorySelect,
|
LocalStoreRepositorySelect,
|
||||||
@ -11,7 +11,7 @@ import RepositorySelect, {
|
|||||||
type Status,
|
type Status,
|
||||||
REPO_ID_KEY,
|
REPO_ID_KEY,
|
||||||
} from "./RepositorySelect";
|
} from "./RepositorySelect";
|
||||||
import {Assets} from "../assets";
|
import {Assets} from "../../webutil/assets";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
toJSON,
|
toJSON,
|
||||||
@ -20,8 +20,8 @@ import {
|
|||||||
} from "./repoIdRegistry";
|
} from "./repoIdRegistry";
|
||||||
import {makeRepoId} from "../../core/repoId";
|
import {makeRepoId} from "../../core/repoId";
|
||||||
|
|
||||||
require("../testUtil").configureEnzyme();
|
require("../../webutil/testUtil").configureEnzyme();
|
||||||
require("../testUtil").configureAphrodite();
|
require("../../webutil/testUtil").configureAphrodite();
|
||||||
|
|
||||||
describe("app/credExplorer/RepositorySelect", () => {
|
describe("app/credExplorer/RepositorySelect", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -18,7 +18,7 @@ import {aggregateFlat, type FlatAggregation} from "./aggregate";
|
|||||||
import {TableRow} from "./TableRow";
|
import {TableRow} from "./TableRow";
|
||||||
import {nodes as factorioNodes} from "../../../plugins/demo/graph";
|
import {nodes as factorioNodes} from "../../../plugins/demo/graph";
|
||||||
|
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/pagerankTable/Aggregation", () => {
|
describe("app/credExplorer/pagerankTable/Aggregation", () => {
|
||||||
describe("AggregationRowList", () => {
|
describe("AggregationRowList", () => {
|
||||||
|
@ -11,7 +11,7 @@ import {TableRow} from "./TableRow";
|
|||||||
import {NodeRow} from "./Node";
|
import {NodeRow} from "./Node";
|
||||||
import {nodes as factorioNodes} from "../../../plugins/demo/graph";
|
import {nodes as factorioNodes} from "../../../plugins/demo/graph";
|
||||||
|
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/pagerankTable/Connection", () => {
|
describe("app/credExplorer/pagerankTable/Connection", () => {
|
||||||
describe("ConnectionRowList", () => {
|
describe("ConnectionRowList", () => {
|
||||||
|
@ -14,7 +14,7 @@ import {example} from "./sharedTestUtils";
|
|||||||
import {NodeRowList, NodeRow, type NodeRowProps} from "./Node";
|
import {NodeRowList, NodeRow, type NodeRowProps} from "./Node";
|
||||||
import {nodes as factorioNodes} from "../../../plugins/demo/graph";
|
import {nodes as factorioNodes} from "../../../plugins/demo/graph";
|
||||||
|
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/pagerankTable/Node", () => {
|
describe("app/credExplorer/pagerankTable/Node", () => {
|
||||||
describe("NodeRowList", () => {
|
describe("NodeRowList", () => {
|
||||||
|
@ -12,7 +12,7 @@ import {WeightConfig} from "../weights/WeightConfig";
|
|||||||
import {defaultWeightsForAdapter} from "../weights/weights";
|
import {defaultWeightsForAdapter} from "../weights/weights";
|
||||||
import {FactorioStaticAdapter} from "../../../plugins/demo/appAdapter";
|
import {FactorioStaticAdapter} from "../../../plugins/demo/appAdapter";
|
||||||
|
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
describe("app/credExplorer/pagerankTable/Table", () => {
|
describe("app/credExplorer/pagerankTable/Table", () => {
|
||||||
describe("PagerankTable", () => {
|
describe("PagerankTable", () => {
|
||||||
async function setup(defaultNodeFilter?: NodeAddressT) {
|
async function setup(defaultNodeFilter?: NodeAddressT) {
|
||||||
|
@ -5,7 +5,7 @@ import {shallow} from "enzyme";
|
|||||||
import {TableRow, PaddingRow} from "./TableRow";
|
import {TableRow, PaddingRow} from "./TableRow";
|
||||||
|
|
||||||
import {COLUMNS} from "./sharedTestUtils";
|
import {COLUMNS} from "./sharedTestUtils";
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/pagerankTable/TableRow", () => {
|
describe("app/credExplorer/pagerankTable/TableRow", () => {
|
||||||
function example() {
|
function example() {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import deepEqual from "lodash.isequal";
|
import deepEqual from "lodash.isequal";
|
||||||
|
|
||||||
import {Graph, type NodeAddressT} from "../../core/graph";
|
import {Graph, type NodeAddressT} from "../../core/graph";
|
||||||
import type {Assets} from "../../app/assets";
|
import type {Assets} from "../../webutil/assets";
|
||||||
import type {RepoId} from "../../core/repoId";
|
import type {RepoId} from "../../core/repoId";
|
||||||
import {type EdgeEvaluator} from "../../analysis/pagerank";
|
import {type EdgeEvaluator} from "../../analysis/pagerank";
|
||||||
import {
|
import {
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
} from "./state";
|
} from "./state";
|
||||||
|
|
||||||
import {Graph, NodeAddress} from "../../core/graph";
|
import {Graph, NodeAddress} from "../../core/graph";
|
||||||
import {Assets} from "../assets";
|
import {Assets} from "../../webutil/assets";
|
||||||
import {makeRepoId, type RepoId} from "../../core/repoId";
|
import {makeRepoId, type RepoId} from "../../core/repoId";
|
||||||
import {type EdgeEvaluator} from "../../analysis/pagerank";
|
import {type EdgeEvaluator} from "../../analysis/pagerank";
|
||||||
import type {WeightedTypes} from "../../analysis/weights";
|
import type {WeightedTypes} from "../../analysis/weights";
|
||||||
|
@ -7,7 +7,7 @@ import {WeightSlider} from "./WeightSlider";
|
|||||||
import {EdgeTypeConfig, EdgeWeightSlider} from "./EdgeTypeConfig";
|
import {EdgeTypeConfig, EdgeWeightSlider} from "./EdgeTypeConfig";
|
||||||
import {assemblesEdgeType} from "../../../plugins/demo/declaration";
|
import {assemblesEdgeType} from "../../../plugins/demo/declaration";
|
||||||
|
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/weights/EdgeTypeConfig", () => {
|
describe("app/credExplorer/weights/EdgeTypeConfig", () => {
|
||||||
describe("EdgeTypeConfig", () => {
|
describe("EdgeTypeConfig", () => {
|
||||||
|
@ -7,7 +7,7 @@ import {WeightSlider} from "./WeightSlider";
|
|||||||
import {NodeTypeConfig} from "./NodeTypeConfig";
|
import {NodeTypeConfig} from "./NodeTypeConfig";
|
||||||
import {inserterNodeType} from "../../../plugins/demo/declaration";
|
import {inserterNodeType} from "../../../plugins/demo/declaration";
|
||||||
|
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/weights/NodeTypeConfig", () => {
|
describe("app/credExplorer/weights/NodeTypeConfig", () => {
|
||||||
describe("NodeTypeConfig", () => {
|
describe("NodeTypeConfig", () => {
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
} from "../../../analysis/weights";
|
} from "../../../analysis/weights";
|
||||||
import {defaultWeightsForAdapter} from "./weights";
|
import {defaultWeightsForAdapter} from "./weights";
|
||||||
|
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/weights/PluginWeightConfig", () => {
|
describe("app/credExplorer/weights/PluginWeightConfig", () => {
|
||||||
describe("PluginWeightConfig", () => {
|
describe("PluginWeightConfig", () => {
|
||||||
|
@ -12,7 +12,7 @@ import {FALLBACK_NAME} from "../../../analysis/fallbackDeclaration";
|
|||||||
import {defaultWeightsForAdapterSet, defaultWeightsForAdapter} from "./weights";
|
import {defaultWeightsForAdapterSet, defaultWeightsForAdapter} from "./weights";
|
||||||
import {WeightConfig} from "./WeightConfig";
|
import {WeightConfig} from "./WeightConfig";
|
||||||
|
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/weights/WeightConfig", () => {
|
describe("app/credExplorer/weights/WeightConfig", () => {
|
||||||
describe("WeightConfig", () => {
|
describe("WeightConfig", () => {
|
||||||
|
@ -5,7 +5,7 @@ import {shallow} from "enzyme";
|
|||||||
|
|
||||||
import {WeightSlider, formatWeight} from "./WeightSlider";
|
import {WeightSlider, formatWeight} from "./WeightSlider";
|
||||||
|
|
||||||
require("../../testUtil").configureEnzyme();
|
require("../../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/credExplorer/weights/WeightSlider", () => {
|
describe("app/credExplorer/weights/WeightSlider", () => {
|
||||||
describe("WeightSlider", () => {
|
describe("WeightSlider", () => {
|
||||||
|
@ -3,7 +3,7 @@ import React from "react";
|
|||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
import createBrowserHistory from "history/lib/createBrowserHistory";
|
import createBrowserHistory from "history/lib/createBrowserHistory";
|
||||||
|
|
||||||
import createRelativeHistory from "./createRelativeHistory";
|
import createRelativeHistory from "../webutil/createRelativeHistory";
|
||||||
import normalize from "../util/pathNormalize";
|
import normalize from "../util/pathNormalize";
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// inline syntax.
|
// inline syntax.
|
||||||
|
|
||||||
/*::
|
/*::
|
||||||
import type {Assets} from "./assets";
|
import type {Assets} from "../webutil/assets";
|
||||||
type RouteDatum = {|
|
type RouteDatum = {|
|
||||||
+path: string,
|
+path: string,
|
||||||
+contents:
|
+contents:
|
||||||
|
@ -7,8 +7,8 @@ import ReactDOMServer from "react-dom/server";
|
|||||||
import {match, RouterContext} from "react-router";
|
import {match, RouterContext} from "react-router";
|
||||||
|
|
||||||
import Page from "./Page";
|
import Page from "./Page";
|
||||||
import {Assets, rootFromPath} from "./assets";
|
import {Assets, rootFromPath} from "../webutil/assets";
|
||||||
import createRelativeHistory from "./createRelativeHistory";
|
import createRelativeHistory from "../webutil/createRelativeHistory";
|
||||||
import ExternalRedirect from "./ExternalRedirect";
|
import ExternalRedirect from "./ExternalRedirect";
|
||||||
import {createRoutes} from "./createRoutes";
|
import {createRoutes} from "./createRoutes";
|
||||||
import {resolveRouteFromPath, resolveTitleFromPath} from "./routeData";
|
import {resolveRouteFromPath, resolveTitleFromPath} from "./routeData";
|
||||||
|
@ -7,7 +7,7 @@ import type {
|
|||||||
DynamicAppAdapter,
|
DynamicAppAdapter,
|
||||||
} from "../../app/adapters/appAdapter";
|
} from "../../app/adapters/appAdapter";
|
||||||
import {StaticAdapterSet} from "../../app/adapters/adapterSet";
|
import {StaticAdapterSet} from "../../app/adapters/adapterSet";
|
||||||
import {Assets} from "../../app/assets";
|
import {Assets} from "../../webutil/assets";
|
||||||
import {type RepoId, makeRepoId} from "../../core/repoId";
|
import {type RepoId, makeRepoId} from "../../core/repoId";
|
||||||
import {NodeAddress, type NodeAddressT} from "../../core/graph";
|
import {NodeAddress, type NodeAddressT} from "../../core/graph";
|
||||||
import {graph} from "./graph";
|
import {graph} from "./graph";
|
||||||
|
@ -6,7 +6,7 @@ import type {
|
|||||||
import {Graph} from "../../core/graph";
|
import {Graph} from "../../core/graph";
|
||||||
import * as N from "./nodes";
|
import * as N from "./nodes";
|
||||||
import {description} from "./render";
|
import {description} from "./render";
|
||||||
import type {Assets} from "../../app/assets";
|
import type {Assets} from "../../webutil/assets";
|
||||||
import type {RepoId} from "../../core/repoId";
|
import type {RepoId} from "../../core/repoId";
|
||||||
import type {Repository} from "./types";
|
import type {Repository} from "./types";
|
||||||
import type {GitGateway} from "./gitGateway";
|
import type {GitGateway} from "./gitGateway";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Link from "../../app/Link";
|
import Link from "../../webutil/Link";
|
||||||
import * as N from "./nodes";
|
import * as N from "./nodes";
|
||||||
import type {Repository} from "./types";
|
import type {Repository} from "./types";
|
||||||
import {type RepoIdString, stringToRepoId} from "../../core/repoId";
|
import {type RepoIdString, stringToRepoId} from "../../core/repoId";
|
||||||
|
@ -6,9 +6,9 @@ import {description} from "./render";
|
|||||||
import {type RepoId, repoIdToString, makeRepoId} from "../../core/repoId";
|
import {type RepoId, repoIdToString, makeRepoId} from "../../core/repoId";
|
||||||
import type {Repository, Hash, Commit} from "./types";
|
import type {Repository, Hash, Commit} from "./types";
|
||||||
import type {GitGateway, URL} from "./gitGateway";
|
import type {GitGateway, URL} from "./gitGateway";
|
||||||
import Link from "../../app/Link";
|
import Link from "../../webutil/Link";
|
||||||
|
|
||||||
require("../../app/testUtil").configureEnzyme();
|
require("../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("plugins/git/render", () => {
|
describe("plugins/git/render", () => {
|
||||||
const repoId1 = makeRepoId("example-owner", "1");
|
const repoId1 = makeRepoId("example-owner", "1");
|
||||||
|
@ -10,7 +10,7 @@ import {createGraph} from "./createGraph";
|
|||||||
import * as N from "./nodes";
|
import * as N from "./nodes";
|
||||||
import {RelationalView} from "./relationalView";
|
import {RelationalView} from "./relationalView";
|
||||||
import {description} from "./render";
|
import {description} from "./render";
|
||||||
import type {Assets} from "../../app/assets";
|
import type {Assets} from "../../webutil/assets";
|
||||||
import type {RepoId} from "../../core/repoId";
|
import type {RepoId} from "../../core/repoId";
|
||||||
import type {PluginDeclaration} from "../../analysis/pluginDeclaration";
|
import type {PluginDeclaration} from "../../analysis/pluginDeclaration";
|
||||||
import {declaration} from "./declaration";
|
import {declaration} from "./declaration";
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import React, {type Node as ReactNode} from "react";
|
import React, {type Node as ReactNode} from "react";
|
||||||
import * as R from "./relationalView";
|
import * as R from "./relationalView";
|
||||||
|
|
||||||
import Link from "../../app/Link";
|
import Link from "../../webutil/Link";
|
||||||
|
|
||||||
function EntityUrl(props) {
|
function EntityUrl(props) {
|
||||||
return (
|
return (
|
||||||
|
@ -5,8 +5,8 @@ import {exampleEntities} from "./example/example";
|
|||||||
import {description} from "./render";
|
import {description} from "./render";
|
||||||
import enzymeToJSON from "enzyme-to-json";
|
import enzymeToJSON from "enzyme-to-json";
|
||||||
|
|
||||||
require("../../app/testUtil").configureAphrodite();
|
require("../../webutil/testUtil").configureAphrodite();
|
||||||
require("../../app/testUtil").configureEnzyme();
|
require("../../webutil/testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("plugins/github/render", () => {
|
describe("plugins/github/render", () => {
|
||||||
const examples = exampleEntities();
|
const examples = exampleEntities();
|
||||||
|
@ -9,7 +9,7 @@ import Link from "./Link";
|
|||||||
require("./testUtil").configureAphrodite();
|
require("./testUtil").configureAphrodite();
|
||||||
require("./testUtil").configureEnzyme();
|
require("./testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("src/app/Link", () => {
|
describe("webutil/Link", () => {
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
x: {fontWeight: "bold"},
|
x: {fontWeight: "bold"},
|
||||||
});
|
});
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import {Assets, rootFromPath} from "./assets";
|
import {Assets, rootFromPath} from "./assets";
|
||||||
|
|
||||||
describe("app/assets", () => {
|
describe("webutil/assets", () => {
|
||||||
describe("Assets", () => {
|
describe("Assets", () => {
|
||||||
describe("with an unknown root path (null)", () => {
|
describe("with an unknown root path (null)", () => {
|
||||||
it("can be constructed", () => {
|
it("can be constructed", () => {
|
@ -3,7 +3,7 @@
|
|||||||
import {LocalStore} from "./localStore";
|
import {LocalStore} from "./localStore";
|
||||||
import CheckedLocalStore from "./checkedLocalStore";
|
import CheckedLocalStore from "./checkedLocalStore";
|
||||||
|
|
||||||
describe("src/app/checkedLocalStore", () => {
|
describe("webutil/checkedLocalStore", () => {
|
||||||
function makeBase(): LocalStore {
|
function makeBase(): LocalStore {
|
||||||
return {
|
return {
|
||||||
get: jest.fn(),
|
get: jest.fn(),
|
@ -11,7 +11,7 @@ import createRelativeHistory from "./createRelativeHistory";
|
|||||||
|
|
||||||
require("./testUtil").configureEnzyme();
|
require("./testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/createRelativeHistory", () => {
|
describe("webutil/createRelativeHistory", () => {
|
||||||
function createHistory(basename, path) {
|
function createHistory(basename, path) {
|
||||||
const memoryHistory = createMemoryHistory(path);
|
const memoryHistory = createMemoryHistory(path);
|
||||||
const relativeHistory = createRelativeHistory(memoryHistory, basename);
|
const relativeHistory = createRelativeHistory(memoryHistory, basename);
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import MemoryLocalStore from "./memoryLocalStore";
|
import MemoryLocalStore from "./memoryLocalStore";
|
||||||
|
|
||||||
describe("src/app/memoryLocalStore", () => {
|
describe("webutil/memoryLocalStore", () => {
|
||||||
it("stores simple values", () => {
|
it("stores simple values", () => {
|
||||||
const ls = new MemoryLocalStore();
|
const ls = new MemoryLocalStore();
|
||||||
ls.set("one", 1);
|
ls.set("one", 1);
|
@ -12,7 +12,7 @@ import createRelativeHistory from "./createRelativeHistory";
|
|||||||
|
|
||||||
require("./testUtil").configureEnzyme();
|
require("./testUtil").configureEnzyme();
|
||||||
|
|
||||||
describe("app/withAssets", () => {
|
describe("webutil/withAssets", () => {
|
||||||
function createHistory(basename, path) {
|
function createHistory(basename, path) {
|
||||||
const memoryHistory = createMemoryHistory(path);
|
const memoryHistory = createMemoryHistory(path);
|
||||||
const relativeHistory = createRelativeHistory(memoryHistory, basename);
|
const relativeHistory = createRelativeHistory(memoryHistory, basename);
|
Loading…
x
Reference in New Issue
Block a user