You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add integration tests for the library's algorithms. Assume that the upstream Essentia, from which Essentia.js is built, is already tested. Thus, these integration tests should check that the JS part (wrapper) is working correctly.
However, this could include unit tests as a prior step, to ensure that the Emscripten transpilation process (c++ –> WASM) doesn't negatively affect algorithms' output or render some of them unusable.
How?
Consider creating basic unit tests as a prior step to compare JS algorithm outputs to Python algorithm outputs as a kind of regression testing. These tests could be generated automatically from code_generator.py, then the results saved to file for comparison with another smaller script.
Most of these test should probably ensure one of two things:
that algorithm method calls don't produce any exceptions,
that types are treated correctly and algorithms throw when wrong types are given
For reference, these are the types in included algorithms:
param types: ['integer', 'real', 'string', 'vector_real', 'bool']
input types: ['vector_real', 'real', 'vector_vector_real', 'vector_string', 'string']
output types: ['real', 'vector_real', 'vector_vector_real', 'integer', 'string', 'vector_string']
So tests should consider cases for these types (as param, input, and output types).
The text was updated successfully, but these errors were encountered:
Description
Add integration tests for the library's algorithms. Assume that the upstream Essentia, from which Essentia.js is built, is already tested. Thus, these integration tests should check that the JS part (wrapper) is working correctly.
However, this could include unit tests as a prior step, to ensure that the Emscripten transpilation process (c++ –> WASM) doesn't negatively affect algorithms' output or render some of them unusable.
How?
Consider creating basic unit tests as a prior step to compare JS algorithm outputs to Python algorithm outputs as a kind of regression testing. These tests could be generated automatically from
code_generator.py
, then the results saved to file for comparison with another smaller script.Do this first set of tests on Node.js
E. g. https://github.com/avajs/ava
Types
Most of these test should probably ensure one of two things:
For reference, these are the types in included algorithms:
param types:
['integer', 'real', 'string', 'vector_real', 'bool']
input types:
['vector_real', 'real', 'vector_vector_real', 'vector_string', 'string']
output types:
['real', 'vector_real', 'vector_vector_real', 'integer', 'string', 'vector_string']
So tests should consider cases for these types (as param, input, and output types).
The text was updated successfully, but these errors were encountered: