Skip to content

test: migrate from test runner tap to jest #238

Closed
@petermetz

Description

Update 2021-08-09

This used to be about AVA but now is about Jest

Update 2020-11-02

Switched the target to AVA from jest, details below in comments.

Description

As a developer I want to be able to write unit tests for the universal packages that execute the same code both in NodeJS and in the browser so that I don't have to duplicate work in order to have test coverage for both platforms for the cross-platform packages.

While working on the stable signature generation, we've discovered that accidentally the wrong library was used initially (congratulations to Peter) which is called "tap" instead of "tape". They both do the same thing (test runners for TAP - Test Anything Protocol) but the tap library does not work in browsers while the tape library is, so to keep the build/test infrastructure of the project as simple as possible it would be the best to migrate to tape entirely since it anyway has support for TAP (the protocol)

https://www.npmjs.com/package/ava

Acceptance Criteria

  1. Complexity of build/test scripts has not increased
  2. Tests for cross-platform packages such as cactus-common can be written once and ran "anywhere" (NodeJS, browser)
  3. Developer workflow has not lengthened, did not increase in complexity (from the human perspective, not code-wise that was mentioned in 1))

cc: @takeutak @sfuji822 @hartm @jonathan-m-hamilton @AzaharaC @jordigiam @kikoncuo

Metadata

Assignees

No one assigned

    Labels

    HacktoberfestHacktoberfest participants are welcome to take a stab at issues marked with this label.Nice-to-HaveP4Priority 4: LowTestsAnything related to tests be that automatic or manual, integration or unit, etc.backlogTasks that are needed but we cannot prioritize them at present.bugSomething isn't workingdependenciesPull requests that update a dependency filegood-first-issueGood for newcomersgood-first-issue-200-intermediate

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions