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
Out current unit tests are powered by Tap. This is problematic for multiple reasons:
Tap is Node-only, which makes it hard to implement running the suite across browsers instead of just Node.
We're currently stuck on Tap v12.4 because later versions break our setup and I haven't been able to track down the exact root cause. There were ~70 releases since then, with the latest being v14.10.6.
The project philosophy generally makes it very hard to debug issues like the one above — Tap increasingly tries to cram every possible feature into it, currently having typescript, esm, remove-flow-types and nyc in its direct dependencies (while we use the last three separately and this likely leads to weird conflicts).
It's a bloated project with a 2700-line package lock (~100MB in node_modules).
We should switch to Tape. It's already used in our project for browser query tests, and extending its use across the project will make our test setup simpler, lighter and easier to manage. Tape advantages:
Works in all browsers.
Minimalistic. No bloat and unnecessary dependencies, easy to debug.
More popular — 3x the GH stars and 7x "used by" repos.
The biggest obstacle to the switch is that a lot of our unit tests depend on beforeEach / afterEach hooks, which are not supported by Tape. The latter is a design choice, which prefers explicit setup/teardown inline in each test for simplicity and clarity. I like this approach more, but it may take substantial effort to refactor our suite to it.
Another blocker I found while attempting this port (for the browser part of using tape) was all the node API's we use for fs and path within our tests to load fixtures.
Out current unit tests are powered by Tap. This is problematic for multiple reasons:
typescript
,esm
,remove-flow-types
andnyc
in its direct dependencies (while we use the last three separately and this likely leads to weird conflicts).node_modules
).We should switch to Tape. It's already used in our project for browser query tests, and extending its use across the project will make our test setup simpler, lighter and easier to manage. Tape advantages:
The biggest obstacle to the switch is that a lot of our unit tests depend on
beforeEach
/afterEach
hooks, which are not supported by Tape. The latter is a design choice, which prefers explicit setup/teardown inline in each test for simplicity and clarity. I like this approach more, but it may take substantial effort to refactor our suite to it.cc @arindam1993 @kkaefer
The text was updated successfully, but these errors were encountered: