
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@ton/test-utils
Advanced tools
This package contains useful testing utilities, such as unit test matchers (for jest, chai, and bun) and other useful functions, such as randomAddress.
yarn add @ton/test-utils -D
or
npm i --save-dev @ton/test-utils
To use the test matchers, just install either jest, chai, or bun and import this package like so:
import "@ton/test-utils";
import { expect } from '@jest/globals';
import "@ton/test-utils";
test('cell comparison', () => {
expect(cell1).toEqualCell(cell2);
});
import { expect } from 'chai';
import "@ton/test-utils";
it('cell comparison', () => {
expect(cell1).to.equalCell(cell2);
});
import { expect, test } from 'bun:test';
import "@ton/test-utils";
test('cell comparison', () => {
expect(cell1).toEqualCell(cell2);
});
The transaction matcher (.toHaveTransaction) can only perform matching on transactions with descriptions of type generic. When matching an array of transactions, all transactions of other types will be filtered out. When matching a single transaction of non-generic type, an exception will be thrown.
This package is released under the MIT License.
[0.12.0] - 2025-09-22
FAQs
Utilities for writing tests for smart contract systems in TON
The npm package @ton/test-utils receives a total of 40,281 weekly downloads. As such, @ton/test-utils popularity was classified as popular.
We found that @ton/test-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.