Skip to content

Commit

Permalink
test: restore timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-haynes committed Jun 20, 2024
1 parent c6b5b64 commit 3232afb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 3 additions & 1 deletion packages/accounts/test/account.access_key.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeAll, beforeEach, expect, test } from '@jest/globals';
import { beforeAll, beforeEach, expect, jest, test } from '@jest/globals';
import { KeyPair } from '@near-js/crypto';

import { createAccount, deployContract, generateUniqueString, networkId, setUpTestConnection } from './test-utils';
Expand All @@ -8,6 +8,8 @@ let workingAccount;
let contractId;
let contract;

jest.setTimeout(50000);

beforeAll(async () => {
nearjs = await setUpTestConnection();
});
Expand Down
3 changes: 2 additions & 1 deletion packages/accounts/test/account.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterAll, beforeAll, beforeEach, describe, expect, test } from '@jest/globals';
import { afterAll, beforeAll, beforeEach, describe, expect, jest, test } from '@jest/globals';
import { getTransactionLastResult, Logger } from '@near-js/utils';
import { actionCreators } from '@near-js/transactions';
import { BlockResult, TypedError } from '@near-js/types';
Expand All @@ -10,6 +10,7 @@ import { createAccount, generateUniqueString, HELLO_WASM_PATH, HELLO_WASM_BALANC
let nearjs;
let workingAccount;

jest.setTimeout(50000);

beforeAll(async () => {
nearjs = await setUpTestConnection();
Expand Down
4 changes: 3 additions & 1 deletion packages/accounts/test/account_multisig.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeAll, describe, expect, test } from '@jest/globals';
import { beforeAll, describe, expect, jest, test } from '@jest/globals';
import { parseNearAmount } from '@near-js/utils';
import { KeyPair } from '@near-js/crypto';
import { InMemorySigner } from '@near-js/signers';
Expand All @@ -14,6 +14,8 @@ const { functionCall, transfer } = actionCreators;
let nearjs;
let startFromVersion;

jest.setTimeout(50000);

const getAccount2FA = async (account, keyMapping = ({ public_key: publicKey }) => ({ publicKey, kind: 'phone' })) => {
// modifiers to functions replaces contract helper (CH)
const { accountId } = account;
Expand Down
6 changes: 4 additions & 2 deletions packages/accounts/test/promise.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { afterEach, beforeAll, beforeEach, describe, expect, test } from '@jest/globals';
import { afterEach, beforeAll, beforeEach, describe, expect, jest, test } from '@jest/globals';
import { deployContract, generateUniqueString, setUpTestConnection } from './test-utils';

let nearjs;

const CONTRACT_CALL_GAS = BigInt(300000000000000);
const CONTRACT_CALL_GAS = 300000000000000n;

jest.setTimeout(120000);

beforeAll(async () => {
nearjs = await setUpTestConnection();
Expand Down
4 changes: 2 additions & 2 deletions packages/providers/test/providers.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { afterAll, beforeAll, describe, expect, test } from '@jest/globals';
import { afterAll, beforeAll, describe, expect, jest, test } from '@jest/globals';
import { getTransactionLastResult } from '@near-js/utils';
import { Worker } from 'near-workspaces';
import { TextEncoder } from 'util';
import { FailoverRpcProvider, JsonRpcProvider } from '../src';


jest.setTimeout(20000);
global.TextEncoder = TextEncoder;

['json provider', 'fallback provider'].forEach((name) => {
Expand Down

0 comments on commit 3232afb

Please sign in to comment.