diff --git a/config/test.js b/config/test.js index 83152c5..176a392 100644 --- a/config/test.js +++ b/config/test.js @@ -1,6 +1,6 @@ // @flow -const execDependencyGraph = require("../src/tools/execDependencyGraph").default; +const execDependencyGraph = require("../src/tools/execDependencyGraph"); main(); diff --git a/src/cli/load.js b/src/cli/load.js index 6fcd25b..c4e288b 100644 --- a/src/cli/load.js +++ b/src/cli/load.js @@ -12,11 +12,10 @@ import dedent from "../util/dedent"; import type {Command} from "./command"; import * as Common from "./common"; +import execDependencyGraph from "../tools/execDependencyGraph"; import {loadGithubData} from "../plugins/github/loadGithubData"; import {loadGitData} from "../plugins/git/loadGitData"; -const execDependencyGraph = require("../tools/execDependencyGraph").default; - function usage(print: (string) => void): void { print( dedent`\ diff --git a/src/cli/load.test.js b/src/cli/load.test.js index 50cdb09..be31363 100644 --- a/src/cli/load.test.js +++ b/src/cli/load.test.js @@ -10,9 +10,7 @@ import load, {help} from "./load"; import * as RepoRegistry from "../app/credExplorer/repoRegistry"; import {stringToRepo} from "../core/repo"; -jest.mock("../tools/execDependencyGraph", () => ({ - default: jest.fn(), -})); +jest.mock("../tools/execDependencyGraph", () => jest.fn()); jest.mock("../plugins/github/loadGithubData", () => ({ loadGithubData: jest.fn(), })); @@ -21,8 +19,7 @@ jest.mock("../plugins/git/loadGitData", () => ({ })); type JestMockFn = $Call; -const execDependencyGraph: JestMockFn = (require("../tools/execDependencyGraph") - .default: any); +const execDependencyGraph: JestMockFn = (require("../tools/execDependencyGraph"): any); const loadGithubData: JestMockFn = (require("../plugins/github/loadGithubData") .loadGithubData: any); const loadGitData: JestMockFn = (require("../plugins/git/loadGitData") diff --git a/src/tools/execDependencyGraph.js b/src/tools/execDependencyGraph.js index 0c82f63..72b1f76 100644 --- a/src/tools/execDependencyGraph.js +++ b/src/tools/execDependencyGraph.js @@ -48,7 +48,7 @@ const defaultOptions = { overallFailLabel: "FAILURE", }; -exports.default = async function execDependencyGraph( +module.exports = async function execDependencyGraph( tasks /*: $ReadOnlyArray */, options /*:: ?: RunOptions */ ) /*: Promise */ {