@chainsafe/eth2.0-spec-test-util
Spec test suite generator from yaml test files
Last updated 8 months ago by gregthegreek .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @chainsafe/eth2.0-spec-test-util 
SYNC missed versions from official npm registry.

eth2.0-spec-test-util

Mocha / Chai utility for interacting with eth2.0 spec tests

API

describeSpecTest

Run yaml Eth2.0 spec tests for a certain function Compares actual vs expected for all test cases

Parameters

  • testYamlPath string path to yaml spec test
  • testFunc Function function to use to generate output
  • getInput Function function to convert test case into input array (optional, default testCase=>testCase.input)
  • getExpected Function function to convert test case into a comparable expected output (optional, default testCase=>testCase.output)
  • getActual Function function to convert function output into comparable actual output (optional, default result=>result)
  • shouldError Function function to convert test case into a boolean, if the case should result in an error (optional, default (testCase,index,testSpec)=>false)
  • shouldSkip Function function to convert test case into a boolean, if the case should be skipped (optional, default (testCase,index,testSpec)=>false)
  • expectFunc Function function to run expectations against expected and actual output (optional, default (testCase,expect,expected,actual)=>expect(actual).to.be.equal(expected))

Profiling

Set env variable GEN_PROFILE_DIR with path to directory where you wish your cpu profiles to be generated.

Current Tags

  • 0.4.3                                ...           latest (5 months ago)

10 Versions

  • 0.4.3                                ...           5 months ago
  • 0.4.2                                ...           5 months ago
  • 0.4.1                                ...           8 months ago
  • 0.3.6                                ...           a year ago
  • 0.3.5                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.3                                ...           a year ago
  • 0.2.2                                ...           a year ago
  • 0.2.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 10
Dependencies (9)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |