Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ton-org/test-utils
https://github.com/ton-org/test-utils
hack-ton-berfest hacktoberfest
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ton-org/test-utils
- Owner: ton-org
- License: mit
- Created: 2023-01-19T11:48:17.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-25T18:30:42.000Z (about 1 year ago)
- Last Synced: 2024-10-13T21:39:38.898Z (2 months ago)
- Topics: hack-ton-berfest, hacktoberfest
- Language: TypeScript
- Homepage:
- Size: 943 KB
- Stars: 5
- Watchers: 9
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# test-utils
This package contains useful testing utilities, such as unit test matchers (for jest and chai) and other useful functions, such as `randomAddress`.
## Installation
```
yarn add @ton/test-utils -D
```
or
```
npm i --save-dev @ton/test-utils
```## Usage
To use the test matchers, just install either jest or chai and import this package like so:
```typescript
import "@ton/test-utils";
```### Transaction matcher notice
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.
## License
This package is released under the [MIT License](LICENSE).