1.1.0 • Published 7 years ago
ethereumjs-testing v1.1.0
SYNOPSIS
Testing utilities for the ethereumjs stack.
Uses the offical Ethereum Tests.
To fetch the latest tests:
git submodule init
git submodule update
cd tests
git pull origin developAPI
const testing = require('ethereumjs-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)argsforkConfig- Run tests for selected fork (BlockchainTestsonly)dir- Only run tests from subdirectoryfile- File filter to applyexcludeDir- Exclude directory filter to applytest- Only run a single test casetestsPath- Path to the tests repository (without thetestsdir)skipTests- List of tests to skipskipVM- List of VM tests to skip
testing.getTestFromSource(file, onFile)
Reads custom test from a relative path or file
file- Relative path or filenameonFile- 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 directory.