Skip to content

Run some unit tests on compiled bundles #9955

Closed
@gaearon

Description

@gaearon

A lot of our tests are now using only public APIs, and with #9954 this number is growing.

Soon we'll delete the Stack reconciler code, and with it we can remove some feature flags (partly responsible for non-public API calls) as well as Stack-specific tests.

We'll still have some tests that operate directly on files, but we should be in a position when we can opt in specific test files (hopefully, a growing count) into running on compiled development and production bundles. We'd only do this on CI so that we don't compromise local iteration speed.

We already have expectDev and expect separation which we use today for telling "warning only" failures on http://isfiberreadyyet.com/. But we can use it in the future for telling whether an expectation should be skipped for a PROD bundle.

We could use some help here: both with building an initial proof of concept of running some tests on CI with bundles, and with converting more tests to only use public APIs. You can search the source for // TODO: can we express this test with only public API? to find good starting points for tests that might be better written against public APIs (which is not always possible but you can try).

This is a bit open-ended and probably requires some prior knowledge of how we test things, and generally feeling comfortable with this repo. If you contributed before, this is a good issue to dive into.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions