Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/unit/accounts/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,20 @@
});

test('cross-contact assertion and panic', async () => {
await expect(

Check failure on line 181 in test/unit/accounts/account.test.ts

View workflow job for this annotation

GitHub Actions / checks

test/unit/accounts/account.test.ts > with deploy contract > cross-contact assertion and panic

AssertionError: expected [Function] to throw error matching /Smart contract panicked: expected to …/ but got 'Total prepaid gas 1000000000000000 ex…' - Expected: /Smart contract panicked: expected to fail./ + Received: "Total prepaid gas 1000000000000000 exceeds limit 300000000000000" ❯ test/unit/accounts/account.test.ts:181:9
nearjs.account.callFunctionRaw({
contractId: contract.contractId,
methodName: 'crossContract',
args: {},
gas: 300000000000000,
gas: 1000000000000000,
})
).rejects.toThrow(/Smart contract panicked: expected to fail./);
});

test('cross-contact assertion and panic 2', async () => {
const result = await nearjs.account.signAndSendTransaction({
receiverId: contract.contractId,
actions: [actions.functionCall('crossContract', {}, 300000000000000n, 0n)],
actions: [actions.functionCall('crossContract', {}, 1000000000000000n, 0n)],
throwOnFailure: false,
});

Expand Down
2 changes: 1 addition & 1 deletion test/unit/accounts/promise.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { deployContract, generateUniqueString, setUpTestConnection } from './tes

let nearjs: Awaited<ReturnType<typeof setUpTestConnection>>;

const CONTRACT_CALL_GAS = 300000000000000n;
const CONTRACT_CALL_GAS = 1000000000000000n;

beforeAll(async () => {
nearjs = await setUpTestConnection();
Expand Down
Loading