Détail du package

ethereumjs-testing

ethereumjs30MPL-2.01.1.0

test utils for ethereumjs-*

readme

SYNOPSIS

Build Status Gitter or #ethereumjs on freenode

js-standard-style

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 develop

API

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)
  • 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 directory.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog (modification: no type change headlines) and this project adheres to Semantic Versioning.

1.1.0 - 2018-06-22

  • Updated tests submodule (Byzantium compatible, partly Constantinople compatible)
  • Removed BlockchainTests limitation to GeneralStateTests subfolder
  • Support for new GeneralStateTests format
  • New --dir and excludeDir CL arguments
  • Functionality for skipping tests
  • Added API documentation in README
  • New examples/ folder with read-single-file and read-tests-with-args example (also for library testing)

1.0.4 - 2016-11-10

  • Minor Changes

1.0.0 - 2016-11-09

  • Library rewrite, first generalized testing version

Older releases:

  • 0.0.2 - 2016-10-27
  • 0.0.1 - 2016-01-20