Skip to content

Write integration tests #66

Description

@jmarcosfer

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:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions