Skip to content

Modifying Tests.js to handle multiple test exports #68

Closed
@hot9cups

Description

@hot9cups

This is in response to the comment from my last PR.
I've been experimenting ever since, and I think there's a way it could be achieved.

What we want to do:

  1. For every problem, if we have multiple solutions, then we would like to have multiple test functions, one for each solution. This should help in debugging as well as is a cleaner and more maintainable way of writing code. We should also be free to name our test functions anything, as opposed to the rigid and undescriptive names(test or in some cases test1, test2, etc) we have right now,
  2. We want to modify Tests.js to be able to handle the test imports dynamically. Right now we hardcode it to invoke the test function as can be seen here. We want to get rid of this hardcoding as well as be able to invoke varying number of tests per test file as opposed to being able to invoke just 1 test per test file currently.

After having explored some of the options Javascript offers, I have found a solution to do this.
I'll be happy to work on the PR if you'd like to assign the issue to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions