aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/tests
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-11-04 10:24:29 -0300
committerSebastian <sebasjm@gmail.com>2022-11-04 11:56:04 -0300
commite6a95d246d14a8968833ce7dcfdf0e7622a610ee (patch)
treea49a49ec2df3a9a307500d8f4e1ff99a717752e7 /packages/merchant-backoffice-ui/tests
parent66460e5650e19c12e105a8fe7560b9744c898b5d (diff)
downloadwallet-core-e6a95d246d14a8968833ce7dcfdf0e7622a610ee.tar.xz
fix imports
Diffstat (limited to 'packages/merchant-backoffice-ui/tests')
-rw-r--r--packages/merchant-backoffice-ui/tests/axiosMock.ts6
-rw-r--r--packages/merchant-backoffice-ui/tests/context/backend.test.tsx10
-rw-r--r--packages/merchant-backoffice-ui/tests/functions/regex.test.ts2
-rw-r--r--packages/merchant-backoffice-ui/tests/header.test.tsx8
-rw-r--r--packages/merchant-backoffice-ui/tests/hooks/listener.test.ts2
-rw-r--r--packages/merchant-backoffice-ui/tests/hooks/notification.test.ts2
-rw-r--r--packages/merchant-backoffice-ui/tests/hooks/swr/index.tsx4
-rw-r--r--packages/merchant-backoffice-ui/tests/hooks/swr/instance.test.ts8
-rw-r--r--packages/merchant-backoffice-ui/tests/hooks/swr/order.test.ts6
-rw-r--r--packages/merchant-backoffice-ui/tests/hooks/swr/product.test.ts6
-rw-r--r--packages/merchant-backoffice-ui/tests/hooks/swr/reserve.test.ts8
-rw-r--r--packages/merchant-backoffice-ui/tests/hooks/swr/transfer.test.ts8
-rw-r--r--packages/merchant-backoffice-ui/tests/stories.test.tsx6
13 files changed, 38 insertions, 38 deletions
diff --git a/packages/merchant-backoffice-ui/tests/axiosMock.ts b/packages/merchant-backoffice-ui/tests/axiosMock.ts
index 13ddab598..5bb8694c9 100644
--- a/packages/merchant-backoffice-ui/tests/axiosMock.ts
+++ b/packages/merchant-backoffice-ui/tests/axiosMock.ts
@@ -19,9 +19,9 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import * as axios from 'axios';
-import { MerchantBackend } from '../src/declaration';
-import { mockAxiosOnce, setAxiosRequestAsTestingEnvironment } from '../src/utils/switchableAxios';
-// import { mockAxiosOnce, setAxiosRequestAsTestingEnvironment } from "../src/hooks/backend";
+import { MerchantBackend } from "../src/declaration.js";
+import { mockAxiosOnce, setAxiosRequestAsTestingEnvironment } from "../src/utils/switchableAxios.js";
+// import { mockAxiosOnce, setAxiosRequestAsTestingEnvironment } from "../src/hooks/backend.js";
export type Query<Req, Res> = (GetQuery | PostQuery | DeleteQuery | PatchQuery) & RequestResponse<Req, Res>
diff --git a/packages/merchant-backoffice-ui/tests/context/backend.test.tsx b/packages/merchant-backoffice-ui/tests/context/backend.test.tsx
index b7b50fd47..5e80d4adb 100644
--- a/packages/merchant-backoffice-ui/tests/context/backend.test.tsx
+++ b/packages/merchant-backoffice-ui/tests/context/backend.test.tsx
@@ -22,14 +22,14 @@
import { renderHook } from "@testing-library/preact-hooks";
import { ComponentChildren, h, VNode } from "preact";
import { act } from "preact/test-utils";
-import { BackendContextProvider } from "../../src/context/backend";
-import { InstanceContextProvider } from "../../src/context/instance";
-import { MerchantBackend } from "../../src/declaration";
+import { BackendContextProvider } from "../../src/context/backend.js";
+import { InstanceContextProvider } from "../../src/context/instance.js";
+import { MerchantBackend } from "../../src/declaration.js";
import {
useAdminAPI,
useInstanceAPI,
useManagementAPI,
-} from "../../src/hooks/instance";
+} from "../../src/hooks/instance.js";
import {
API_CREATE_INSTANCE,
API_GET_CURRENT_INSTANCE,
@@ -37,7 +37,7 @@ import {
API_UPDATE_INSTANCE_AUTH_BY_ID,
assertJustExpectedRequestWereMade,
AxiosMockEnvironment,
-} from "../axiosMock";
+} from "../axiosMock.js";
interface TestingContextProps {
children?: ComponentChildren;
diff --git a/packages/merchant-backoffice-ui/tests/functions/regex.test.ts b/packages/merchant-backoffice-ui/tests/functions/regex.test.ts
index fc8a6a42f..ed06fb655 100644
--- a/packages/merchant-backoffice-ui/tests/functions/regex.test.ts
+++ b/packages/merchant-backoffice-ui/tests/functions/regex.test.ts
@@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { AMOUNT_REGEX, PAYTO_REGEX } from "../../src/utils/constants";
+import { AMOUNT_REGEX, PAYTO_REGEX } from "../../src/utils/constants.js";
describe('payto uri format', () => {
const valids = [
diff --git a/packages/merchant-backoffice-ui/tests/header.test.tsx b/packages/merchant-backoffice-ui/tests/header.test.tsx
index f098b70d5..d855346de 100644
--- a/packages/merchant-backoffice-ui/tests/header.test.tsx
+++ b/packages/merchant-backoffice-ui/tests/header.test.tsx
@@ -20,12 +20,12 @@
*/
import { h } from "preact";
-import { ProductList } from "../src/components/product/ProductList";
+import { ProductList } from "../src/components/product/ProductList.js";
// See: https://github.com/preactjs/enzyme-adapter-preact-pure
// import { shallow } from 'enzyme';
-import * as backend from "../src/context/config";
+import * as backend from "../src/context/config.js";
import { render, findAllByText } from "@testing-library/preact";
-import * as i18n from "../src/context/translation";
+import * as i18n from "../src/context/translation.js";
import * as jedLib from "jed";
const handler = new jedLib.Jed("en");
@@ -54,7 +54,7 @@ describe("Initial Test of the Sidebar", () => {
unit: "book",
},
]}
- />
+ />,
);
expect(context.findAllByText("description of the product")).toBeDefined();
diff --git a/packages/merchant-backoffice-ui/tests/hooks/listener.test.ts b/packages/merchant-backoffice-ui/tests/hooks/listener.test.ts
index ae34c1339..3320b044e 100644
--- a/packages/merchant-backoffice-ui/tests/hooks/listener.test.ts
+++ b/packages/merchant-backoffice-ui/tests/hooks/listener.test.ts
@@ -20,7 +20,7 @@
*/
import { renderHook, act } from '@testing-library/preact-hooks';
-import { useListener } from '../../src/hooks/listener';
+import { useListener } from "../../src/hooks/listener.js";
// jest.useFakeTimers()
diff --git a/packages/merchant-backoffice-ui/tests/hooks/notification.test.ts b/packages/merchant-backoffice-ui/tests/hooks/notification.test.ts
index 561c991ad..75cfcd015 100644
--- a/packages/merchant-backoffice-ui/tests/hooks/notification.test.ts
+++ b/packages/merchant-backoffice-ui/tests/hooks/notification.test.ts
@@ -20,7 +20,7 @@
*/
import { renderHook, act} from '@testing-library/preact-hooks';
-import { useNotifications } from '../../src/hooks/notifications';
+import { useNotifications } from "../../src/hooks/notifications.js";
jest.useFakeTimers()
diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/index.tsx b/packages/merchant-backoffice-ui/tests/hooks/swr/index.tsx
index 44514855d..1cf9220d6 100644
--- a/packages/merchant-backoffice-ui/tests/hooks/swr/index.tsx
+++ b/packages/merchant-backoffice-ui/tests/hooks/swr/index.tsx
@@ -21,8 +21,8 @@
import { ComponentChildren, h, VNode } from "preact";
import { SWRConfig } from "swr";
-import { BackendContextProvider } from "../../../src/context/backend";
-import { InstanceContextProvider } from "../../../src/context/instance";
+import { BackendContextProvider } from "../../../src/context/backend.js";
+import { InstanceContextProvider } from "../../../src/context/instance.js";
interface TestingContextProps {
children?: ComponentChildren;
diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/instance.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/instance.test.ts
index 55d9fa6ee..5bc463e74 100644
--- a/packages/merchant-backoffice-ui/tests/hooks/swr/instance.test.ts
+++ b/packages/merchant-backoffice-ui/tests/hooks/swr/instance.test.ts
@@ -21,8 +21,8 @@
import { renderHook } from "@testing-library/preact-hooks";
import { act } from "preact/test-utils";
-import { MerchantBackend } from "../../../src/declaration";
-import { useAdminAPI, useBackendInstances, useInstanceAPI, useInstanceDetails, useManagementAPI } from "../../../src/hooks/instance";
+import { MerchantBackend } from "../../../src/declaration.js";
+import { useAdminAPI, useBackendInstances, useInstanceAPI, useInstanceDetails, useManagementAPI } from "../../../src/hooks/instance.js";
import {
API_CREATE_INSTANCE,
API_DELETE_INSTANCE,
@@ -34,8 +34,8 @@ import {
API_UPDATE_INSTANCE_BY_ID,
assertJustExpectedRequestWereMade,
AxiosMockEnvironment
-} from "../../axiosMock";
-import { TestingContext } from "./index";
+} from "../../axiosMock.js";
+import { TestingContext } from "./index.js";
describe("instance api interaction with details ", () => {
diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/order.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/order.test.ts
index e7f6c9334..29f117df6 100644
--- a/packages/merchant-backoffice-ui/tests/hooks/swr/order.test.ts
+++ b/packages/merchant-backoffice-ui/tests/hooks/swr/order.test.ts
@@ -22,15 +22,15 @@
import { renderHook } from "@testing-library/preact-hooks";
import { act } from "preact/test-utils";
import { TestingContext } from ".";
-import { MerchantBackend } from "../../../src/declaration";
-import { useInstanceOrders, useOrderAPI, useOrderDetails } from "../../../src/hooks/order";
+import { MerchantBackend } from "../../../src/declaration.js";
+import { useInstanceOrders, useOrderAPI, useOrderDetails } from "../../../src/hooks/order.js";
import {
API_CREATE_ORDER,
API_DELETE_ORDER,
API_FORGET_ORDER_BY_ID,
API_GET_ORDER_BY_ID,
API_LIST_ORDERS, API_REFUND_ORDER_BY_ID, assertJustExpectedRequestWereMade, assertNextRequest, assertNoMoreRequestWereMade, AxiosMockEnvironment
-} from "../../axiosMock";
+} from "../../axiosMock.js";
describe("order api interaction with listing", () => {
diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/product.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/product.test.ts
index 5d39a7c47..9beaec747 100644
--- a/packages/merchant-backoffice-ui/tests/hooks/swr/product.test.ts
+++ b/packages/merchant-backoffice-ui/tests/hooks/swr/product.test.ts
@@ -22,8 +22,8 @@
import { renderHook } from "@testing-library/preact-hooks";
import { act } from "preact/test-utils";
import { TestingContext } from ".";
-import { MerchantBackend } from "../../../src/declaration";
-import { useInstanceProducts, useProductAPI, useProductDetails } from "../../../src/hooks/product";
+import { MerchantBackend } from "../../../src/declaration.js";
+import { useInstanceProducts, useProductAPI, useProductDetails } from "../../../src/hooks/product.js";
import {
API_CREATE_PRODUCT,
API_DELETE_PRODUCT, API_GET_PRODUCT_BY_ID,
@@ -32,7 +32,7 @@ import {
assertJustExpectedRequestWereMade,
assertNextRequest,
AxiosMockEnvironment
-} from "../../axiosMock";
+} from "../../axiosMock.js";
describe("product api interaction with listing ", () => {
it("should evict cache when creating a product", async () => {
diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/reserve.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/reserve.test.ts
index 0361c54e8..ba01b380e 100644
--- a/packages/merchant-backoffice-ui/tests/hooks/swr/reserve.test.ts
+++ b/packages/merchant-backoffice-ui/tests/hooks/swr/reserve.test.ts
@@ -21,13 +21,13 @@
import { renderHook } from "@testing-library/preact-hooks";
import { act } from "preact/test-utils";
-import { MerchantBackend } from "../../../src/declaration";
+import { MerchantBackend } from "../../../src/declaration.js";
import {
useInstanceReserves,
useReserveDetails,
useReservesAPI,
useTipDetails,
-} from "../../../src/hooks/reserves";
+} from "../../../src/hooks/reserves.js";
import {
API_AUTHORIZE_TIP,
API_AUTHORIZE_TIP_FOR_RESERVE,
@@ -38,8 +38,8 @@ import {
API_LIST_RESERVES,
assertJustExpectedRequestWereMade,
AxiosMockEnvironment,
-} from "../../axiosMock";
-import { TestingContext } from "./index";
+} from "../../axiosMock.js";
+import { TestingContext } from "./index.js";
describe("reserve api interaction with listing ", () => {
it("should evict cache when creating a reserve", async () => {
diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/transfer.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/transfer.test.ts
index 612cf8842..54c908629 100644
--- a/packages/merchant-backoffice-ui/tests/hooks/swr/transfer.test.ts
+++ b/packages/merchant-backoffice-ui/tests/hooks/swr/transfer.test.ts
@@ -20,16 +20,16 @@
*/
import { act, renderHook } from "@testing-library/preact-hooks";
-import { TestingContext } from "./index";
-import { useInstanceTransfers, useTransferAPI } from "../../../src/hooks/transfer";
+import { TestingContext } from "./index.js";
+import { useInstanceTransfers, useTransferAPI } from "../../../src/hooks/transfer.js";
import {
API_INFORM_TRANSFERS,
API_LIST_TRANSFERS,
assertJustExpectedRequestWereMade,
assertNoMoreRequestWereMade,
AxiosMockEnvironment,
-} from "../../axiosMock";
-import { MerchantBackend } from "../../../src/declaration";
+} from "../../axiosMock.js";
+import { MerchantBackend } from "../../../src/declaration.js";
describe("transfer api interaction with listing", () => {
diff --git a/packages/merchant-backoffice-ui/tests/stories.test.tsx b/packages/merchant-backoffice-ui/tests/stories.test.tsx
index 5fb3483d2..b7336efde 100644
--- a/packages/merchant-backoffice-ui/tests/stories.test.tsx
+++ b/packages/merchant-backoffice-ui/tests/stories.test.tsx
@@ -19,8 +19,8 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { h, VNode } from "preact";
-import * as config from "../src/context/config";
-import * as i18n from "../src/context/translation";
+import * as config from "../src/context/config.js";
+import * as i18n from "../src/context/translation.js";
import { cleanup, render as originalRender } from "@testing-library/preact";
import { SWRConfig } from "swr";
@@ -49,7 +49,7 @@ function render(vnode: VNode) {
}}
>
{vnode}
- </SWRConfig>
+ </SWRConfig>,
);
}