Skip to content

Commit 7c2a0d7

Browse files
Seulgi Kimmergify[bot]
authored andcommitted
Remove unused imports
`chaiAsPromised` is only needed to test promises.
1 parent 033e11e commit 7c2a0d7

15 files changed

+3
-61
lines changed

test/src/e2e.dynval/1/doubleVote.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
1817
import { expect } from "chai";
19-
import * as chaiAsPromised from "chai-as-promised";
2018
import * as stake from "codechain-stakeholder-sdk";
2119
import "mocha";
2220

@@ -26,8 +24,6 @@ import { Step as TendermintStep } from "../../helper/mock/tendermintMessage";
2624
import { PromiseExpect } from "../../helper/promise";
2725
import { setTermTestTimeout, withNodes } from "../setup";
2826

29-
chai.use(chaiAsPromised);
30-
3127
describe("Double vote detection", function() {
3228
const promiseExpect = new PromiseExpect();
3329

test/src/e2e.dynval/1/dv.m-m'.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
1817
import { expect } from "chai";
19-
import * as chaiAsPromised from "chai-as-promised";
2018
import { SDK } from "codechain-sdk";
2119
import * as stake from "codechain-stakeholder-sdk";
2220
import "mocha";
@@ -30,8 +28,6 @@ import {
3028
withNodes
3129
} from "../setup";
3230

33-
chai.use(chaiAsPromised);
34-
3531
describe("Dynamic Validator M -> M' (Changed the subset, M, M’ = maximum number)", function() {
3632
const promiseExpect = new PromiseExpect();
3733

test/src/e2e.dynval/1/dv.n'.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
1817
import { expect } from "chai";
19-
import * as chaiAsPromised from "chai-as-promised";
2018
import { SDK } from "codechain-sdk";
2119
import * as stake from "codechain-stakeholder-sdk";
2220
import "mocha";
@@ -26,8 +24,6 @@ import { faucetAddress, faucetSecret } from "../../helper/constants";
2624
import { PromiseExpect } from "../../helper/promise";
2725
import { findNode, setTermTestTimeout, withNodes } from "../setup";
2826

29-
chai.use(chaiAsPromised);
30-
3127
describe("Dynamic Validator N -> N'", function() {
3228
const promiseExpect = new PromiseExpect();
3329

test/src/e2e.dynval/1/dv.n-1.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
1817
import { expect } from "chai";
19-
import * as chaiAsPromised from "chai-as-promised";
2018
import { SDK } from "codechain-sdk";
2119
import * as stake from "codechain-stakeholder-sdk";
2220
import "mocha";
@@ -26,8 +24,6 @@ import { faucetAddress, faucetSecret } from "../../helper/constants";
2624
import { PromiseExpect } from "../../helper/promise";
2725
import { setTermTestTimeout, withNodes } from "../setup";
2826

29-
chai.use(chaiAsPromised);
30-
3127
const allDynValidators = originalValidators.slice(0, 4);
3228
const [alice, ...otherDynValidators] = allDynValidators;
3329

test/src/e2e.dynval/1/dv.n.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
1817
import { expect } from "chai";
19-
import * as chaiAsPromised from "chai-as-promised";
2018
import { SDK } from "codechain-sdk";
2119
import * as stake from "codechain-stakeholder-sdk";
2220
import "mocha";
@@ -26,8 +24,6 @@ import { faucetAddress, faucetSecret } from "../../helper/constants";
2624
import { PromiseExpect } from "../../helper/promise";
2725
import { findNode, setTermTestTimeout, withNodes } from "../setup";
2826

29-
chai.use(chaiAsPromised);
30-
3127
describe("Dynamic Validator N -> N", function() {
3228
const promiseExpect = new PromiseExpect();
3329

test/src/e2e.dynval/2/dv.n+1.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
1817
import { expect } from "chai";
19-
import * as chaiAsPromised from "chai-as-promised";
2018
import { SDK } from "codechain-sdk";
2119
import * as stake from "codechain-stakeholder-sdk";
2220
import "mocha";
@@ -26,8 +24,6 @@ import { faucetAddress, faucetSecret } from "../../helper/constants";
2624
import { PromiseExpect } from "../../helper/promise";
2725
import { findNode, setTermTestTimeout, withNodes } from "../setup";
2826

29-
chai.use(chaiAsPromised);
30-
3127
describe("Dynamic Validator N -> N+1", function() {
3228
const promiseExpect = new PromiseExpect();
3329

test/src/e2e.dynval/2/dv.nomination.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
1817
import { expect } from "chai";
19-
import * as chaiAsPromised from "chai-as-promised";
2018
import { H512 } from "codechain-primitives/lib";
2119
import * as stake from "codechain-stakeholder-sdk";
2220
import "mocha";
@@ -30,8 +28,6 @@ import {
3028
withNodes
3129
} from "../setup";
3230

33-
chai.use(chaiAsPromised);
34-
3531
describe("Nomination", function() {
3632
const promiseExpect = new PromiseExpect();
3733
const NOMINATION_EXPIRATION = 2;

test/src/e2e.dynval/2/dv.oneblockoneterm.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
18-
import * as chaiAsPromised from "chai-as-promised";
1917
import "mocha";
2018
import { validators as originalDynValidators } from "../../../tendermint.dynval/constants";
2119
import { PromiseExpect } from "../../helper/promise";
2220
import { withNodes } from "../setup";
2321

24-
chai.use(chaiAsPromised);
25-
2622
// Verifying external blocks take different code path with internal blocks.
2723
// We need both a proposer and a verifier to test them.
2824
const [alice, bob] = originalDynValidators;

test/src/e2e.dynval/2/dv.shutdown.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
1817
import { expect } from "chai";
19-
import * as chaiAsPromised from "chai-as-promised";
2018
import * as stake from "codechain-stakeholder-sdk";
2119
import "mocha";
2220

@@ -25,8 +23,6 @@ import { PromiseExpect } from "../../helper/promise";
2523
import CodeChain from "../../helper/spawn";
2624
import { fullyConnect, setTermTestTimeout, withNodes } from "../setup";
2725

28-
chai.use(chaiAsPromised);
29-
3026
describe("Shutdown test", function() {
3127
const promiseExpect = new PromiseExpect();
3228

test/src/e2e.dynval/dv.double-vote.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

17-
import * as chai from "chai";
1817
import { expect } from "chai";
19-
import * as chaiAsPromised from "chai-as-promised";
2018
import {
2119
blake256,
2220
H256,
@@ -38,8 +36,6 @@ import { Signer } from "../helper/spawn";
3836
import CodeChain from "../helper/spawn";
3937
import { findNode, setTermTestTimeout, withNodes } from "./setup";
4038

41-
chai.use(chaiAsPromised);
42-
4339
const HANDLER_ID = 2;
4440
const REPORT_DOUBLE_VOTE_ACTION_ID = 5;
4541

0 commit comments

Comments
 (0)