Open Bug 1948961 Opened 1 month ago Updated 1 month ago

Better UniFFI JS unit tests

Categories

(Toolkit :: UniFFI Bindings, enhancement)

enhancement

Tracking

()

People

(Reporter: bdk, Unassigned)

References

Details

(Whiteboard: [disco-])

Right now our unit test story for JS is not great and it also requires us publishing a multiple test fixtures to crates.io. When I implemented async, I ended up creating a new fixture for it rather than using the existing async fixture because I didn't want to start publishing it and also because it wasn't that great of a fixture.

We've been discussing how we can improve testing in the UniFFI meetings and the consensus seems to be:

  • Figure out a way to have a single test fixture crate, rather than multiple
  • Make tests that are only focused on the bindings code. Don't test the scaffolding code and don't try to make real-world examples. See https://github.com/mozilla/uniffi-rs/pull/2348 for how these would look.

Let's implement these new tests and start using them on JS.

You need to log in before you can comment on or make changes to this bug.