Move generated Jest tests to TypeScript #1287

Closed
NickGerleman wants to merge 2 commits from export-D45723545 into main

2 Commits

Author SHA1 Message Date
Nick Gerleman
4c5c647f41 Move generated Jest tests to TypeScript (#1287)
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1287

Outputs tests as TypeScript, along with using/testing the new form of enums imported directly from the package.

We need to change how we are telling Jest which variant to run, so that tests can import enums from "yoga-layout" and have it resolve to the entrypoint which has a binary which has already been built.

Reviewed By: yungsters

Differential Revision: D45723545

fbshipit-source-id: 63e6da1fdf7b4b13ccc97fa95d9dee87b4d3605d
2023-05-10 21:11:22 -07:00
Nick Gerleman
6f91133089 Add data-disabled to test fixtures
Summary:
This can be marked in fixtures to skip a test without commenting it out. We add one more usage of this.

The same functionality existed (unused) before for `experiments`, which I changed to `data-experiments`.

Formatting of JS tests changed to be closer to what Prettier would output, and to remove usage of `Yoga.UNDEFINED` which doesn't existi and just resolves to `undefined` (this is converted to NaN by the wrapper layer).

Differential Revision: D45723003

fbshipit-source-id: c014e1695d90fcb44d62f6a636ddbb0d86ec6eff
2023-05-10 21:10:46 -07:00