https://github.com/vaporyjs/vaporyjs-testing
Testing utilities for the vaporyjs stack.
https://github.com/vaporyjs/vaporyjs-testing
vaporyjs
Last synced: 15 days ago
JSON representation
Testing utilities for the vaporyjs stack.
- Host: GitHub
- URL: https://github.com/vaporyjs/vaporyjs-testing
- Owner: vaporyjs
- Created: 2018-03-04T04:42:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-23T07:14:00.000Z (almost 5 years ago)
- Last Synced: 2025-06-30T04:40:40.572Z (6 months ago)
- Topics: vaporyjs
- Language: JavaScript
- Homepage: https://vapory.org
- Size: 84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# SYNOPSIS
[](https://travis-ci.org/vaporyjs/vaporyjs-testing)
[]() or #vaporyjs on freenode
[](https://github.com/feross/standard)
Testing utilities for the vaporyjs stack.
Uses the offical [Vapory Tests](https://github.com/vaporyco/tests).
To fetch the latest tests:
```
git submodule init
git submodule update
cd tests
git pull origin develop
```
## API
```
const testing = require('vaporyjs-testing')
```
#### `testing.getTestsFromArgs(testType, onFile, args = {})`
Reads tests of a certain test type from several folders and files
- `testType` - Type of the test (``GeneralStateTests``, ``BlockchainTests``, ``VMTests``)
- `onFile` - Function to run the tests (see example)
- `args`
- `forkConfig` - Run tests for selected fork (``BlockchainTests`` only)
- `dir` - Only run tests from subdirectory
- `file` - File filter to apply
- `excludeDir` - Exclude directory filter to apply
- `test` - Only run a single test case
- `testsPath` - Path to the tests repository (without the ``tests`` dir)
- `skipTests` - List of tests to skip
- `skipVM` - List of VM tests to skip
#### `testing.getTestFromSource(file, onFile)`
Reads custom test from a relative path or file
- `file` - Relative path or filename
- `onFile` - Function to run the tests (see example)
#### `testing.getSingleFile(file)`
Reads a single test file
- `file` - Path to the file
Examples how to read tests with the API methods above can be found in
the [./examples](./examples/) directory.