Skip to content

Commit

Permalink
test: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
pcheremu committed Jan 10, 2024
1 parent 6ca42f1 commit e51da22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/integration-tests/tests/api/contracts.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as request from "supertest";
import { setTimeout } from "timers/promises";

import { environment } from "../../src/config";
import { localConfig } from "../../src/config";
import { Buffer, Wallets } from "../../src/entities";
import { Helper } from "../../src/helper";
import { Playbook } from "../../src/playbook/playbook";
import { setTimeout } from 'timers/promises';

describe("Contracts API", () => {
jest.setTimeout(localConfig.standardTimeout);
Expand Down
3 changes: 2 additions & 1 deletion packages/integration-tests/tests/api/logs.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as request from "supertest";
import { setTimeout } from "timers/promises";

import { environment } from "../../src/config";
import { localConfig } from "../../src/config";
import { Buffer } from "../../src/entities";
import { Helper } from "../../src/helper";
import { Playbook } from "../../src/playbook/playbook";
import { setTimeout } from 'timers/promises';


describe("Logs API", () => {
jest.setTimeout(localConfig.standardTimeout); //works unstable without timeout
Expand Down
12 changes: 3 additions & 9 deletions packages/integration-tests/tests/api/transactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,7 @@ describe("Transactions", () => {
.expect((res) =>
expect(res.body.items[0]).toStrictEqual(expect.objectContaining({ type: TransactionsType.fee }))
)
.expect((res) =>
expect(res.body.items[0]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" }))
)
.expect((res) => expect(res.body.items[0]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" })))
.expect((res) => expect(res.body.items[0]).toStrictEqual(expect.objectContaining({ fields: null })))
.expect((res) => expect(typeof res.body.items[0].isInternal).toBeTruthy())
.expect((res) => expect(typeof res.body.items[0].token.l2Address).toStrictEqual("string"))
Expand All @@ -533,9 +531,7 @@ describe("Transactions", () => {
.expect((res) =>
expect(res.body.items[1]).toStrictEqual(expect.objectContaining({ type: TransactionsType.transfer }))
)
.expect((res) =>
expect(res.body.items[1]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" }))
)
.expect((res) => expect(res.body.items[1]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" })))
.expect((res) => expect(res.body.items[1]).toStrictEqual(expect.objectContaining({ fields: null })))
.expect((res) => expect(typeof res.body.items[1].isInternal).toBeTruthy())
.expect((res) => expect(typeof res.body.items[1].token.l2Address).toStrictEqual("string"))
Expand All @@ -562,9 +558,7 @@ describe("Transactions", () => {
.expect((res) =>
expect(res.body.items[2]).toStrictEqual(expect.objectContaining({ type: TransactionsType.refund }))
)
.expect((res) =>
expect(res.body.items[2]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" }))
)
.expect((res) => expect(res.body.items[2]).toStrictEqual(expect.objectContaining({ tokenType: "ETH" })))
.expect((res) => expect(res.body.items[2]).toStrictEqual(expect.objectContaining({ fields: null })))
.expect((res) => expect(typeof res.body.items[2].isInternal).toBeTruthy())
.expect((res) => expect(typeof res.body.items[2].token.l2Address).toStrictEqual("string"))
Expand Down

0 comments on commit e51da22

Please sign in to comment.