@chainsafe/eth2.0-spec-test-util
TypeScript icon, indicating that this package has built-in type declarations

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.4.329latest

Version History

VersionDownloads (Last 7 Days)Published
0.4.329
0.4.21
0.4.11
0.3.61
0.3.51
0.3.01
0.2.31
0.2.21
0.2.11
0.1.01

Package Sidebar

Install

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

Weekly Downloads

38

Version

0.4.3

License

Apache-2.0

Unpacked Size

48.4 kB

Total Files

21

Last publish

Collaborators

  • sadiq1971
  • ansermino
  • gregthegreek
  • priom
  • wemeetagain
  • mpetrunic