icjs-testing

0.0.1 • Public • Published

SYNOPSIS

Build Status Gitter or #icjs on freenode

js-standard-style

Testing utilities for the icjs stack.

Uses the offical IrChain Tests.

To fetch the latest test:

git submodule init
git submodule update
cd tests
git pull origin develop

API

const testing = require('icjs-testing')

testing.getTestsFromArgs(testType, onFile, args = {})

Reads test of a certain test type from several folders and files

  • testType - Type of the test (GeneralStateTests, BlockchainTests, VMTests)
  • onFile - Function to run the test (see example)
  • args
    • forkConfig - Run test for selected fork (BlockchainTests only)
    • dir - Only run test from subdirectory
    • file - File filter to apply
    • excludeDir - Exclude directory filter to apply
    • test - Only run a single test case
    • testsPath - Path to the test repository (without the test dir)
    • skipTests - List of test to skip
    • skipVM - List of VM test 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 test (see example)

testing.getSingleFile(file)

Reads a single test file

  • file - Path to the file

Examples how to read test with the API methods above can be found in the ./examples directory.

Readme

Keywords

Package Sidebar

Install

npm i icjs-testing

Weekly Downloads

3

Version

0.0.1

License

MPL-2.0

Unpacked Size

19.4 kB

Total Files

10

Last publish

Collaborators

  • irchain-io