Skip to content

Commit

Permalink
Clean up the imports of test
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKim20 committed Aug 31, 2024
1 parent d38104a commit c4b0cd4
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 56 deletions.
4 changes: 1 addition & 3 deletions packages/relay/test/Approval.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ import { getPurchaseId, TestClient, TestServer } from "./helper/Utility";
import * as assert from "assert";
import * as fs from "fs";
import * as path from "path";
import URI from "urijs";
import { URL } from "url";
import { ContractManager } from "../src/contract/ContractManager";

// tslint:disable-next-line:no-var-requires
const URI = require("urijs");

chai.use(solidity);

describe("Test of Server", function () {
Expand Down
4 changes: 1 addition & 3 deletions packages/relay/test/Bridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ import chai, { expect } from "chai";
import { solidity } from "ethereum-waffle";

import * as path from "path";
import URI from "urijs";
import { URL } from "url";

// tslint:disable-next-line:no-var-requires
const URI = require("urijs");

chai.use(solidity);

describe("Test of Bridge", function () {
Expand Down
4 changes: 1 addition & 3 deletions packages/relay/test/DelegatedTransfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ import chai, { expect } from "chai";
import { solidity } from "ethereum-waffle";

import * as path from "path";
import URI from "urijs";
import { URL } from "url";

// tslint:disable-next-line:no-var-requires
const URI = require("urijs");

chai.use(solidity);

describe("Test of delegated transfer", function () {
Expand Down
5 changes: 2 additions & 3 deletions packages/relay/test/Endpoints.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import "@nomiclabs/hardhat-waffle";

import { Amount } from "../src/common/Amount";
import { Config } from "../src/common/Config";
import { ContractManager } from "../src/contract/ContractManager";
import { GraphStorage } from "../src/storage/GraphStorage";
import { RelayStorage } from "../src/storage/RelayStorage";
import { ContractUtils, LoyaltyNetworkID } from "../src/utils/ContractUtils";
Expand All @@ -23,16 +24,14 @@ import chai, { expect } from "chai";
import { solidity } from "ethereum-waffle";

import * as path from "path";
import URI from "urijs";
import { URL } from "url";

import { Wallet } from "ethers";

// tslint:disable-next-line:no-implicit-dependencies
import { AddressZero } from "@ethersproject/constants";
import { ContractManager } from "../src/contract/ContractManager";

// tslint:disable-next-line:no-var-requires
const URI = require("urijs");

chai.use(solidity);

Expand Down
16 changes: 2 additions & 14 deletions packages/relay/test/ForcedClose.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,7 @@ import { GraphStorage } from "../src/storage/GraphStorage";
import { RelayStorage } from "../src/storage/RelayStorage";
import { IShopData, IUserData, LoyaltyPaymentTaskStatus } from "../src/types";
import { ContractUtils } from "../src/utils/ContractUtils";
import {
BIP20DelegatedTransfer,
CurrencyRate,
Ledger,
LoyaltyConsumer,
LoyaltyExchanger,
LoyaltyProvider,
PhoneLinkCollection,
Shop,
Validator,
} from "../typechain-types";
import { BIP20DelegatedTransfer, Ledger, LoyaltyProvider } from "../typechain-types";
import { Deployments } from "./helper/Deployments";
import { FakerCallbackServer } from "./helper/FakerCallbackServer";
import { getPurchaseId, TestClient, TestServer } from "./helper/Utility";
Expand All @@ -35,11 +25,9 @@ import { Wallet } from "ethers";
import * as fs from "fs";
import { ethers } from "hardhat";
import * as path from "path";
import URI from "urijs";
import { URL } from "url";

// tslint:disable-next-line:no-var-requires
const URI = require("urijs");

chai.use(solidity);

describe("Test of Server", function () {
Expand Down
4 changes: 1 addition & 3 deletions packages/relay/test/LoyaltyBridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ import chai, { expect } from "chai";
import { solidity } from "ethereum-waffle";

import * as path from "path";
import URI from "urijs";
import { URL } from "url";

// tslint:disable-next-line:no-var-requires
const URI = require("urijs");

chai.use(solidity);

describe("Test of LoyaltyBridge", function () {
Expand Down
4 changes: 1 addition & 3 deletions packages/relay/test/LoyaltyExchanger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ import { solidity } from "ethereum-waffle";

import fs from "fs";
import * as path from "path";
import URI from "urijs";
import { URL } from "url";

import { Wallet } from "ethers";
import { ethers } from "hardhat";

// tslint:disable-next-line:no-var-requires
const URI = require("urijs");

chai.use(solidity);

describe("Test of LoyaltyExchanger", function () {
Expand Down
4 changes: 1 addition & 3 deletions packages/relay/test/LoyaltyTransfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ import chai, { expect } from "chai";
import { solidity } from "ethereum-waffle";

import * as path from "path";
import URI from "urijs";
import { URL } from "url";

// tslint:disable-next-line:no-var-requires
const URI = require("urijs");

chai.use(solidity);

describe("Test of LoyaltyTransfer", function () {
Expand Down
20 changes: 4 additions & 16 deletions packages/relay/test/Payment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,7 @@ import { GraphStorage } from "../src/storage/GraphStorage";
import { RelayStorage } from "../src/storage/RelayStorage";
import { LoyaltyPaymentTaskStatus } from "../src/types";
import { ContractUtils, LoyaltyNetworkID } from "../src/utils/ContractUtils";
import {
BIP20DelegatedTransfer,
CurrencyRate,
Ledger,
LoyaltyConsumer,
LoyaltyExchanger,
LoyaltyProvider,
PhoneLinkCollection,
Shop,
Validator,
} from "../typechain-types";
import { Ledger, LoyaltyProvider, Shop } from "../typechain-types";
import { Deployments } from "./helper/Deployments";
import { FakerCallbackServer } from "./helper/FakerCallbackServer";
import { getPurchaseId, TestClient, TestServer } from "./helper/Utility";
Expand All @@ -30,15 +20,13 @@ import chai, { expect } from "chai";
import { solidity } from "ethereum-waffle";

import * as assert from "assert";
import { BigNumber, Wallet } from "ethers";
import * as path from "path";
import URI from "urijs";
import { URL } from "url";

// tslint:disable-next-line:no-implicit-dependencies
import { BigNumber } from "@ethersproject/bignumber";
import { AddressZero } from "@ethersproject/constants";

// tslint:disable-next-line:no-var-requires
const URI = require("urijs");
import { Wallet } from "@ethersproject/wallet";

chai.use(solidity);

Expand Down
1 change: 0 additions & 1 deletion packages/relay/test/ShopWithdraw.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import path from "path";
import URI from "urijs";
import { URL } from "url";

// tslint:disable-next-line:no-implicit-dependencies
import { AddressZero } from "@ethersproject/constants";

chai.use(solidity);
Expand Down
6 changes: 2 additions & 4 deletions packages/relay/test/TempararyAccount.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ import chai, { expect } from "chai";
import { solidity } from "ethereum-waffle";

import * as path from "path";
import URI from "urijs";
import { URL } from "url";

import * as assert from "assert";
import { BigNumber, Wallet } from "ethers";

// tslint:disable-next-line:no-implicit-dependencies
import { AddressZero } from "@ethersproject/constants";
// tslint:disable-next-line:no-var-requires
const URI = require("urijs");
import { Wallet } from "@ethersproject/wallet";

chai.use(solidity);

Expand Down

0 comments on commit c4b0cd4

Please sign in to comment.