Giter Site home page Giter Site logo

ethereumjs-testing's Introduction

SYNOPSIS

Actions Status Discord

js-standard-style

Testing utilities for the ethereumjs stack.

Uses the offical Ethereum Tests.

To fetch the latest tests:

cd [SUBMODULE_FOLDER]
git fetch --tags origin develop
git tag -l
git checkout tags/[RELEASE_VERSION]
cd ..
git add [SUBMODULE_FOLDER]
git commit -m "[MESSAGE_ON_TEST_RELEASE_UPDATE]"

Releases on npm are outdated, latest releases are only done as tagged versions on GitHub due to npm size constraints, use e.g. git+https://github.com/ethereumjs/ethereumjs-testing.git#[LATEST_TAG_VERSION] in your dependencies.

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.

ethereumjs-testing's People

Contributors

holgerd77 avatar jwasinger avatar whymarrh avatar cdetrio avatar axic avatar evertonfraga avatar s1na avatar greenkeeperio-bot avatar kumavis avatar wanderer avatar jochem-brouwer avatar ryanio avatar greenkeeper[bot] avatar

Stargazers

Ravikant avatar

Watchers

Ravikant avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.