@khanacademy/wonder-blocks-testing 7.1.9 → 7.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/index.js.flow +1 -1
  3. package/package.json +5 -5
  4. package/src/__tests__/mock-requester.test.js +2 -2
  5. package/src/__tests__/respond-with.test.js +2 -2
  6. package/src/__tests__/response-impl.test.js +2 -2
  7. package/src/__tests__/settle-controller.test.js +2 -2
  8. package/src/__tests__/settle-signal.test.js +1 -1
  9. package/src/fetch/__tests__/fetch-request-matches-mock.test.js +1 -1
  10. package/src/fetch/__tests__/mock-fetch.test.js +2 -2
  11. package/src/fetch/fetch-request-matches-mock.js +1 -1
  12. package/src/fetch/mock-fetch.js +3 -3
  13. package/src/fetch/types.js +1 -1
  14. package/src/fixtures/__tests__/fixtures.test.js +1 -1
  15. package/src/fixtures/fixtures.basic.stories.js +1 -1
  16. package/src/fixtures/fixtures.defaultwrapper.stories.js +1 -1
  17. package/src/fixtures/fixtures.js +1 -1
  18. package/src/gql/__tests__/gql-request-matches-mock.test.js +1 -1
  19. package/src/gql/__tests__/mock-gql-fetch.test.js +2 -2
  20. package/src/gql/__tests__/wb-data-integration.test.js +2 -2
  21. package/src/gql/gql-request-matches-mock.js +1 -1
  22. package/src/gql/mock-gql-fetch.js +3 -3
  23. package/src/gql/types.js +2 -2
  24. package/src/harness/__tests__/hook-harness.test.js +8 -8
  25. package/src/harness/__tests__/make-hook-harness.test.js +2 -2
  26. package/src/harness/__tests__/make-test-harness.test.js +3 -3
  27. package/src/harness/__tests__/render-adapters.test.js +2 -2
  28. package/src/harness/__tests__/test-harness.test.js +8 -8
  29. package/src/harness/__tests__/types.flowtest.js +1 -1
  30. package/src/harness/adapters/__tests__/css.test.js +1 -1
  31. package/src/harness/adapters/__tests__/data.test.js +1 -1
  32. package/src/harness/adapters/__tests__/portal.test.js +1 -1
  33. package/src/harness/adapters/__tests__/router.test.js +1 -1
  34. package/src/harness/adapters/adapters.js +5 -5
  35. package/src/harness/adapters/css.js +1 -1
  36. package/src/harness/adapters/data.js +1 -1
  37. package/src/harness/adapters/portal.js +1 -1
  38. package/src/harness/adapters/router.js +1 -1
  39. package/src/harness/hook-harness.js +3 -3
  40. package/src/harness/make-hook-harness.js +2 -2
  41. package/src/harness/make-test-harness.js +2 -2
  42. package/src/harness/render-adapters.js +1 -1
  43. package/src/harness/test-harness.js +3 -3
  44. package/src/index.js +15 -19
  45. package/src/mock-requester.js +2 -2
  46. package/src/respond-with.js +3 -3
  47. package/src/settle-controller.js +1 -1
  48. package/src/types.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @khanacademy/wonder-blocks-testing
2
2
 
3
+ ## 7.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 91cb727c: Update wonder-stuff dependencies
8
+ - 91cb727c: Remove file extensions from imports
9
+ - Updated dependencies [91cb727c]
10
+ - Updated dependencies [91cb727c]
11
+ - Updated dependencies [91cb727c]
12
+ - @khanacademy/wonder-blocks-data@10.1.0
13
+
3
14
  ## 7.1.9
4
15
 
5
16
  ### Patch Changes
@@ -1,2 +1,2 @@
1
1
  // @flow
2
- export * from "../src/index.js";
2
+ export * from "../src/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-testing",
3
- "version": "7.1.9",
3
+ "version": "7.1.10",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,11 +14,11 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@babel/runtime": "^7.18.6",
17
- "@khanacademy/wonder-blocks-data": "^10.0.5"
17
+ "@khanacademy/wonder-blocks-data": "^10.1.0"
18
18
  },
19
19
  "peerDependencies": {
20
- "@khanacademy/wonder-stuff-core": "^1.2.0",
21
- "@khanacademy/wonder-stuff-testing": "^2.3.1",
20
+ "@khanacademy/wonder-stuff-core": "^1.2.1",
21
+ "@khanacademy/wonder-stuff-testing": "^2.3.2",
22
22
  "@storybook/addon-actions": "^6.4.8",
23
23
  "node-fetch": "^2.6.7",
24
24
  "aphrodite": "^1.2.5",
@@ -26,7 +26,7 @@
26
26
  "react-router-dom": "5.3.0"
27
27
  },
28
28
  "devDependencies": {
29
- "wb-dev-build-settings": "^0.7.0"
29
+ "wb-dev-build-settings": "^0.7.1"
30
30
  },
31
31
  "author": "",
32
32
  "license": "MIT"
@@ -1,6 +1,6 @@
1
1
  // @flow
2
- import {RespondWith} from "../respond-with.js";
3
- import {mockRequester} from "../mock-requester.js";
2
+ import {RespondWith} from "../respond-with";
3
+ import {mockRequester} from "../mock-requester";
4
4
 
5
5
  describe("#mockRequester", () => {
6
6
  it("should return a function", () => {
@@ -1,6 +1,6 @@
1
1
  // @flow
2
- import {SettleController} from "../settle-controller.js";
3
- import {RespondWith} from "../respond-with.js";
2
+ import {SettleController} from "../settle-controller";
3
+ import {RespondWith} from "../respond-with";
4
4
 
5
5
  describe("RespondWith", () => {
6
6
  describe("#text.toPromise", () => {
@@ -24,7 +24,7 @@ describe("ResponseImpl", () => {
24
24
  // Act
25
25
  const {ResponseImpl: result, NodeFetchResponse} =
26
26
  wst.jest.isolateModules(() => ({
27
- ResponseImpl: require("../response-impl.js").ResponseImpl,
27
+ ResponseImpl: require("../response-impl").ResponseImpl,
28
28
  NodeFetchResponse: require("node-fetch").Response,
29
29
  }));
30
30
 
@@ -38,7 +38,7 @@ describe("ResponseImpl", () => {
38
38
 
39
39
  // Act
40
40
  const result = wst.jest.isolateModules(
41
- () => require("../response-impl.js").ResponseImpl,
41
+ () => require("../response-impl").ResponseImpl,
42
42
  );
43
43
 
44
44
  // Assert
@@ -1,6 +1,6 @@
1
1
  // @flow
2
- import {SettleController} from "../settle-controller.js";
3
- import {SettleSignal} from "../settle-signal.js";
2
+ import {SettleController} from "../settle-controller";
3
+ import {SettleSignal} from "../settle-signal";
4
4
 
5
5
  describe("SettleController", () => {
6
6
  it("should have a signal", () => {
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import {SettleSignal} from "../settle-signal.js";
2
+ import {SettleSignal} from "../settle-signal";
3
3
 
4
4
  describe("SettleSignal", () => {
5
5
  it("should extend EventTarget", () => {
@@ -1,6 +1,6 @@
1
1
  // @flow
2
2
  import {Request} from "node-fetch";
3
- import {fetchRequestMatchesMock} from "../fetch-request-matches-mock.js";
3
+ import {fetchRequestMatchesMock} from "../fetch-request-matches-mock";
4
4
 
5
5
  const TEST_URL = "http://example.com/foo?querya=1&queryb=elephants#fragment";
6
6
 
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
  import {Request} from "node-fetch";
3
- import {RespondWith} from "../../respond-with.js";
4
- import {mockFetch} from "../mock-fetch.js";
3
+ import {RespondWith} from "../../respond-with";
4
+ import {mockFetch} from "../mock-fetch";
5
5
 
6
6
  describe("#mockFetch", () => {
7
7
  it.each`
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import type {FetchMockOperation} from "./types.js";
2
+ import type {FetchMockOperation} from "./types";
3
3
 
4
4
  /**
5
5
  * Get the URL from the given RequestInfo.
@@ -1,7 +1,7 @@
1
1
  // @flow
2
- import {fetchRequestMatchesMock} from "./fetch-request-matches-mock.js";
3
- import {mockRequester} from "../mock-requester.js";
4
- import type {FetchMockFn, FetchMockOperation} from "./types.js";
2
+ import {fetchRequestMatchesMock} from "./fetch-request-matches-mock";
3
+ import {mockRequester} from "../mock-requester";
4
+ import type {FetchMockFn, FetchMockOperation} from "./types";
5
5
 
6
6
  /**
7
7
  * A mock for the fetch function passed to GqlRouter.
@@ -1,5 +1,5 @@
1
1
  //@flow
2
- import type {MockResponse} from "../respond-with.js";
2
+ import type {MockResponse} from "../respond-with";
3
3
 
4
4
  export type FetchMockOperation = RegExp | string;
5
5
 
@@ -2,7 +2,7 @@
2
2
  import * as React from "react";
3
3
  import {render, screen} from "@testing-library/react";
4
4
  import * as AddonActionsModule from "@storybook/addon-actions";
5
- import {fixtures} from "../fixtures.js";
5
+ import {fixtures} from "../fixtures";
6
6
 
7
7
  jest.mock("@storybook/addon-actions");
8
8
 
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
 
4
- import {fixtures} from "../index.js";
4
+ import {fixtures} from "../index";
5
5
 
6
6
  type Props = {|
7
7
  propA: string,
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
 
4
- import {fixtures} from "../index.js";
4
+ import {fixtures} from "../index";
5
5
 
6
6
  type Props = {...};
7
7
 
@@ -2,7 +2,7 @@
2
2
  import * as React from "react";
3
3
  import {action} from "@storybook/addon-actions";
4
4
 
5
- import type {FixtureFn, FixtureProps} from "./types.js";
5
+ import type {FixtureFn, FixtureProps} from "./types";
6
6
 
7
7
  /**
8
8
  * Describe a group of fixtures for a given component.
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import {gqlRequestMatchesMock} from "../gql-request-matches-mock.js";
2
+ import {gqlRequestMatchesMock} from "../gql-request-matches-mock";
3
3
 
4
4
  describe("#gqlRequestMatchesMock", () => {
5
5
  it("should return false if operation types don't match", () => {
@@ -3,8 +3,8 @@ import * as React from "react";
3
3
  import {render, screen, waitFor} from "@testing-library/react";
4
4
 
5
5
  import {GqlRouter, useGql} from "@khanacademy/wonder-blocks-data";
6
- import {RespondWith} from "../../respond-with.js";
7
- import {mockGqlFetch} from "../mock-gql-fetch.js";
6
+ import {RespondWith} from "../../respond-with";
7
+ import {mockGqlFetch} from "../mock-gql-fetch";
8
8
 
9
9
  describe("#mockGqlFetch", () => {
10
10
  describe("with GqlRouter and useGql", () => {
@@ -3,8 +3,8 @@ import * as React from "react";
3
3
  import {render, screen, waitFor} from "@testing-library/react";
4
4
 
5
5
  import {GqlRouter, useGql} from "@khanacademy/wonder-blocks-data";
6
- import {RespondWith} from "../../respond-with.js";
7
- import {mockGqlFetch} from "../mock-gql-fetch.js";
6
+ import {RespondWith} from "../../respond-with";
7
+ import {mockGqlFetch} from "../mock-gql-fetch";
8
8
 
9
9
  describe("integrating mockGqlFetch, RespondWith, GqlRouter and useGql", () => {
10
10
  it("should reject with error indicating there are no mocks", async () => {
@@ -1,6 +1,6 @@
1
1
  // @flow
2
2
  import type {GqlOperation, GqlContext} from "@khanacademy/wonder-blocks-data";
3
- import type {GqlMockOperation} from "./types.js";
3
+ import type {GqlMockOperation} from "./types";
4
4
 
5
5
  const safeHasOwnProperty = (obj: any, prop: string): boolean =>
6
6
  // Flow really shouldn't be raising this error here.
@@ -1,7 +1,7 @@
1
1
  // @flow
2
- import {gqlRequestMatchesMock} from "./gql-request-matches-mock.js";
3
- import {mockRequester} from "../mock-requester.js";
4
- import type {GqlFetchMockFn, GqlMockOperation} from "./types.js";
2
+ import {gqlRequestMatchesMock} from "./gql-request-matches-mock";
3
+ import {mockRequester} from "../mock-requester";
4
+ import type {GqlFetchMockFn, GqlMockOperation} from "./types";
5
5
 
6
6
  /**
7
7
  * A mock for the fetch function passed to GqlRouter.
package/src/gql/types.js CHANGED
@@ -1,7 +1,7 @@
1
1
  //@flow
2
2
  import type {GqlOperation, GqlContext} from "@khanacademy/wonder-blocks-data";
3
- import type {GraphQLJson} from "../types.js";
4
- import type {MockResponse} from "../respond-with.js";
3
+ import type {GraphQLJson} from "../types";
4
+ import type {MockResponse} from "../respond-with";
5
5
 
6
6
  export type GqlMockOperation<
7
7
  TData: {...},
@@ -1,9 +1,9 @@
1
1
  // @flow
2
2
  import {jest as ws} from "@khanacademy/wonder-stuff-testing";
3
- import * as MHH from "../make-hook-harness.js";
4
- import {DefaultAdapters, DefaultConfigs} from "../adapters/adapters.js";
3
+ import * as MHH from "../make-hook-harness";
4
+ import {DefaultAdapters, DefaultConfigs} from "../adapters/adapters";
5
5
 
6
- jest.mock("../make-hook-harness.js", () => {
6
+ jest.mock("../make-hook-harness", () => {
7
7
  const returnValueFake = {
8
8
  thisisa: "PRETEND REACT COMPONENT",
9
9
  };
@@ -21,7 +21,7 @@ describe("#hookHarness", () => {
21
21
  const makeHookHarnessSpy = jest.spyOn(MHH, "makeHookHarness");
22
22
 
23
23
  // Act
24
- await ws.isolateModules(() => import("../hook-harness.js"));
24
+ await ws.isolateModules(() => import("../hook-harness"));
25
25
 
26
26
  // Assert
27
27
  expect(makeHookHarnessSpy).toHaveBeenCalledWith(
@@ -38,8 +38,8 @@ describe("#hookHarness", () => {
38
38
  // $FlowIgnore[prop-missing] - we add this into our mock at the top.
39
39
  const [{harnessFake}, {hookHarness}] = await ws.isolateModules(() =>
40
40
  Promise.all([
41
- import("../make-hook-harness.js"),
42
- import("../hook-harness.js"),
41
+ import("../make-hook-harness"),
42
+ import("../hook-harness"),
43
43
  ]),
44
44
  );
45
45
 
@@ -58,8 +58,8 @@ describe("#hookHarness", () => {
58
58
  // $FlowIgnore[prop-missing] - we add this into our mock at the top.
59
59
  const [{returnValueFake}, {hookHarness}] = await ws.isolateModules(() =>
60
60
  Promise.all([
61
- import("../make-hook-harness.js"),
62
- import("../hook-harness.js"),
61
+ import("../make-hook-harness"),
62
+ import("../hook-harness"),
63
63
  ]),
64
64
  );
65
65
 
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
  import {render} from "@testing-library/react";
4
- import {makeHookHarness} from "../make-hook-harness.js";
5
- import * as MTH from "../make-test-harness.js";
4
+ import {makeHookHarness} from "../make-hook-harness";
5
+ import * as MTH from "../make-test-harness";
6
6
 
7
7
  describe("#makeHookHarness", () => {
8
8
  it("should call makeTestHarness", () => {
@@ -3,9 +3,9 @@ import * as React from "react";
3
3
  import {Route} from "react-router-dom";
4
4
  import {render} from "@testing-library/react";
5
5
 
6
- import * as RA from "../render-adapters.js";
7
- import {makeTestHarness} from "../make-test-harness.js";
8
- import {DefaultConfigs, DefaultAdapters} from "../adapters/adapters.js";
6
+ import * as RA from "../render-adapters";
7
+ import {makeTestHarness} from "../make-test-harness";
8
+ import {DefaultConfigs, DefaultAdapters} from "../adapters/adapters";
9
9
 
10
10
  describe("#makeTestHarness", () => {
11
11
  it("should return a function", () => {
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
- import {renderAdapters} from "../render-adapters.js";
3
+ import {renderAdapters} from "../render-adapters";
4
4
 
5
- import type {TestHarnessAdapter, TestHarnessConfigs} from "../types.js";
5
+ import type {TestHarnessAdapter, TestHarnessConfigs} from "../types";
6
6
 
7
7
  describe("#renderAdapters", () => {
8
8
  it("should return children if no adapters", () => {
@@ -1,9 +1,9 @@
1
1
  // @flow
2
2
  import {jest as ws} from "@khanacademy/wonder-stuff-testing";
3
- import * as MTH from "../make-test-harness.js";
4
- import {DefaultAdapters, DefaultConfigs} from "../adapters/adapters.js";
3
+ import * as MTH from "../make-test-harness";
4
+ import {DefaultAdapters, DefaultConfigs} from "../adapters/adapters";
5
5
 
6
- jest.mock("../make-test-harness.js", () => {
6
+ jest.mock("../make-test-harness", () => {
7
7
  const returnValueFake = {
8
8
  thisisa: "PRETEND REACT COMPONENT",
9
9
  };
@@ -21,7 +21,7 @@ describe("#testHarness", () => {
21
21
  const makeTestHarnessSpy = jest.spyOn(MTH, "makeTestHarness");
22
22
 
23
23
  // Act
24
- await ws.isolateModules(() => import("../hook-harness.js"));
24
+ await ws.isolateModules(() => import("../hook-harness"));
25
25
 
26
26
  // Assert
27
27
  expect(makeTestHarnessSpy).toHaveBeenCalledWith(
@@ -39,8 +39,8 @@ describe("#testHarness", () => {
39
39
  // $FlowIgnore[prop-missing] - we add this into our mock at the top.
40
40
  const [{harnessFake}, {testHarness}] = await ws.isolateModules(() =>
41
41
  Promise.all([
42
- import("../make-test-harness.js"),
43
- import("../test-harness.js"),
42
+ import("../make-test-harness"),
43
+ import("../test-harness"),
44
44
  ]),
45
45
  );
46
46
 
@@ -60,8 +60,8 @@ describe("#testHarness", () => {
60
60
  // $FlowIgnore[prop-missing] - we add this into our mock at the top.
61
61
  const [{returnValueFake}, {testHarness}] = await ws.isolateModules(() =>
62
62
  Promise.all([
63
- import("../make-test-harness.js"),
64
- import("../test-harness.js"),
63
+ import("../make-test-harness"),
64
+ import("../test-harness"),
65
65
  ]),
66
66
  );
67
67
 
@@ -6,7 +6,7 @@ import type {
6
6
  TestHarnessAdapters,
7
7
  TestHarnessConfig,
8
8
  TestHarnessConfigs,
9
- } from "../types.js";
9
+ } from "../types";
10
10
 
11
11
  /**
12
12
  * TestHarnessAdapter<TConfig>
@@ -2,7 +2,7 @@
2
2
  import * as React from "react";
3
3
  import {render, screen} from "@testing-library/react";
4
4
 
5
- import * as Css from "../css.js";
5
+ import * as Css from "../css";
6
6
 
7
7
  describe("Css.adapter", () => {
8
8
  it("should throw if the config is invalid", () => {
@@ -2,7 +2,7 @@
2
2
  import * as React from "react";
3
3
  import {render, screen, waitFor} from "@testing-library/react";
4
4
  import {useCachedEffect} from "@khanacademy/wonder-blocks-data";
5
- import * as Data from "../data.js";
5
+ import * as Data from "../data";
6
6
 
7
7
  describe("WonderBlocksData.adapter", () => {
8
8
  it("should render children when configuration arrays are empty", () => {
@@ -2,7 +2,7 @@
2
2
  import * as React from "react";
3
3
  import {render, screen} from "@testing-library/react";
4
4
 
5
- import * as Portal from "../portal.js";
5
+ import * as Portal from "../portal";
6
6
 
7
7
  describe("Portal.adapter", () => {
8
8
  it("should render a portal root element", () => {
@@ -2,7 +2,7 @@
2
2
  import * as React from "react";
3
3
  import {withRouter, Prompt} from "react-router-dom";
4
4
  import {render} from "@testing-library/react";
5
- import * as Router from "../router.js";
5
+ import * as Router from "../router";
6
6
 
7
7
  describe("Router.adapter", () => {
8
8
  it("should throw if the config does not match any expecations", () => {
@@ -1,10 +1,10 @@
1
1
  // @flow
2
- import * as css from "./css.js";
3
- import * as data from "./data.js";
4
- import * as portal from "./portal.js";
5
- import * as router from "./router.js";
2
+ import * as css from "./css";
3
+ import * as data from "./data";
4
+ import * as portal from "./portal";
5
+ import * as router from "./router";
6
6
 
7
- import type {TestHarnessConfigs} from "../types.js";
7
+ import type {TestHarnessConfigs} from "../types";
8
8
 
9
9
  /**
10
10
  * NOTE: We do not type `DefaultAdapters` with `Adapters` here because we want
@@ -3,7 +3,7 @@ import * as React from "react";
3
3
 
4
4
  import type {CSSProperties} from "aphrodite";
5
5
 
6
- import type {TestHarnessAdapter} from "../types.js";
6
+ import type {TestHarnessAdapter} from "../types";
7
7
 
8
8
  type Config =
9
9
  | string
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
  import {InterceptRequests} from "@khanacademy/wonder-blocks-data";
4
- import type {TestHarnessAdapter} from "../types.js";
4
+ import type {TestHarnessAdapter} from "../types";
5
5
 
6
6
  type Interceptor = React.ElementConfig<typeof InterceptRequests>["interceptor"];
7
7
 
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
 
4
- import type {TestHarnessAdapter} from "../types.js";
4
+ import type {TestHarnessAdapter} from "../types";
5
5
 
6
6
  type Config = string;
7
7
 
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
  import {StaticRouter, MemoryRouter, Route, Switch} from "react-router-dom";
5
5
 
6
6
  import type {LocationShape, Location} from "react-router-dom";
7
- import type {TestHarnessAdapter} from "../types.js";
7
+ import type {TestHarnessAdapter} from "../types";
8
8
 
9
9
  type MemoryRouterProps = React.ElementConfig<typeof MemoryRouter>;
10
10
 
@@ -1,10 +1,10 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
 
4
- import {makeHookHarness} from "./make-hook-harness.js";
5
- import {DefaultAdapters, DefaultConfigs} from "./adapters/adapters.js";
4
+ import {makeHookHarness} from "./make-hook-harness";
5
+ import {DefaultAdapters, DefaultConfigs} from "./adapters/adapters";
6
6
 
7
- import type {TestHarnessConfigs} from "./types.js";
7
+ import type {TestHarnessConfigs} from "./types";
8
8
 
9
9
  /**
10
10
  * Create test wrapper for hook testing with Wonder Blocks default adapters.
@@ -1,9 +1,9 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
 
4
- import {makeTestHarness} from "./make-test-harness.js";
4
+ import {makeTestHarness} from "./make-test-harness";
5
5
 
6
- import type {TestHarnessAdapters, TestHarnessConfigs} from "./types.js";
6
+ import type {TestHarnessAdapters, TestHarnessConfigs} from "./types";
7
7
 
8
8
  const HookHarness = ({children}) => children;
9
9
 
@@ -1,9 +1,9 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
 
4
- import {renderAdapters} from "./render-adapters.js";
4
+ import {renderAdapters} from "./render-adapters";
5
5
 
6
- import type {TestHarnessAdapters, TestHarnessConfigs} from "./types.js";
6
+ import type {TestHarnessAdapters, TestHarnessConfigs} from "./types";
7
7
 
8
8
  /**
9
9
  * Create a test harness method for use with React components.
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
 
4
- import type {TestHarnessConfigs, TestHarnessAdapters} from "./types.js";
4
+ import type {TestHarnessConfigs, TestHarnessAdapters} from "./types";
5
5
 
6
6
  /**
7
7
  * Render test adapters around a child component.
@@ -1,10 +1,10 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
3
 
4
- import {makeTestHarness} from "./make-test-harness.js";
5
- import {DefaultAdapters, DefaultConfigs} from "./adapters/adapters.js";
4
+ import {makeTestHarness} from "./make-test-harness";
5
+ import {DefaultAdapters, DefaultConfigs} from "./adapters/adapters";
6
6
 
7
- import type {TestHarnessConfigs} from "./types.js";
7
+ import type {TestHarnessConfigs} from "./types";
8
8
 
9
9
  /**
10
10
  * Wrap a component with a test harness using Wonder Blocks default adapters.
package/src/index.js CHANGED
@@ -1,26 +1,22 @@
1
1
  // @flow
2
2
 
3
3
  // Fixtures framework
4
- export {fixtures} from "./fixtures/fixtures.js";
5
- export type {
6
- FixtureFn,
7
- FixtureProps,
8
- GetPropsOptions,
9
- } from "./fixtures/types.js";
4
+ export {fixtures} from "./fixtures/fixtures";
5
+ export type {FixtureFn, FixtureProps, GetPropsOptions} from "./fixtures/types";
10
6
 
11
7
  // Fetch mocking framework
12
- export {mockFetch} from "./fetch/mock-fetch.js";
13
- export {mockGqlFetch} from "./gql/mock-gql-fetch.js";
14
- export {RespondWith} from "./respond-with.js";
15
- export {SettleController} from "./settle-controller.js";
16
- export type {MockResponse} from "./respond-with.js";
17
- export type {FetchMockFn, FetchMockOperation} from "./fetch/types.js";
18
- export type {GqlFetchMockFn, GqlMockOperation} from "./gql/types.js";
8
+ export {mockFetch} from "./fetch/mock-fetch";
9
+ export {mockGqlFetch} from "./gql/mock-gql-fetch";
10
+ export {RespondWith} from "./respond-with";
11
+ export {SettleController} from "./settle-controller";
12
+ export type {MockResponse} from "./respond-with";
13
+ export type {FetchMockFn, FetchMockOperation} from "./fetch/types";
14
+ export type {GqlFetchMockFn, GqlMockOperation} from "./gql/types";
19
15
 
20
16
  // Test harness framework
21
- export * from "./harness/types.js";
22
- export * as harnessAdapters from "./harness/adapters/adapters.js";
23
- export {makeHookHarness} from "./harness/make-hook-harness.js";
24
- export {makeTestHarness} from "./harness/make-test-harness.js";
25
- export {hookHarness} from "./harness/hook-harness.js";
26
- export {testHarness} from "./harness/test-harness.js";
17
+ export * from "./harness/types";
18
+ export * as harnessAdapters from "./harness/adapters/adapters";
19
+ export {makeHookHarness} from "./harness/make-hook-harness";
20
+ export {makeTestHarness} from "./harness/make-test-harness";
21
+ export {hookHarness} from "./harness/hook-harness";
22
+ export {testHarness} from "./harness/test-harness";
@@ -1,6 +1,6 @@
1
1
  // @flow
2
- import type {MockResponse} from "./respond-with.js";
3
- import type {OperationMock, OperationMatcher, MockFn} from "./types.js";
2
+ import type {MockResponse} from "./respond-with";
3
+ import type {OperationMock, OperationMatcher, MockFn} from "./types";
4
4
 
5
5
  /**
6
6
  * A generic mock request function for using when mocking fetch or gqlFetch.
@@ -1,7 +1,7 @@
1
1
  // @flow
2
- import {SettleSignal} from "./settle-signal.js";
3
- import {ResponseImpl} from "./response-impl.js";
4
- import type {GraphQLJson} from "./types.js";
2
+ import {SettleSignal} from "./settle-signal";
3
+ import {ResponseImpl} from "./response-impl";
4
+ import type {GraphQLJson} from "./types";
5
5
 
6
6
  // We want the parameterization here so that folks can assert a response is
7
7
  // of a specific type if passing between various functions. For example,
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import {SettleSignal} from "./settle-signal.js";
2
+ import {SettleSignal} from "./settle-signal";
3
3
 
4
4
  /**
5
5
  * A controller for the `RespondWith` API to control response settlement.
package/src/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import type {MockResponse} from "./respond-with.js";
2
+ import type {MockResponse} from "./respond-with";
3
3
 
4
4
  /**
5
5
  * A valid GraphQL response as supported by our mocking framework.