Neat Paraskavedekatriaphobia's Meaning
Miss any of our Open RFC calls?Watch the recordings here! »

@chainsafe/eth2.0-spec-test-util

0.2.2 • Public • Published

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)

Install

npm i @chainsafe/[email protected]

Version

0.2.2

License

Apache-2.0

Unpacked Size

159 kB

Total Files

9

Last publish

Collaborators

  • avatar
  • avatar
  • avatar