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
This commit is contained in:
Nick Gerleman
2023-05-10 21:10:46 -07:00
committed by Facebook GitHub Bot
parent e409bfb43a
commit 6f91133089
52 changed files with 1846 additions and 1101 deletions

View File

@@ -7,7 +7,7 @@
// @generated by gentest/gentest.rb from gentest/fixtures/YGAndroidNewsFeed.html
test("android_news_feed", () => {
test('android_news_feed', () => {
const config = Yoga.Config.create();
let root;
@@ -113,7 +113,7 @@ test("android_news_feed", () => {
root_child0_child0_child1_child0_child1_child1.setAlignContent(Yoga.ALIGN_STRETCH);
root_child0_child0_child1_child0_child1_child1.setFlexShrink(1);
root_child0_child0_child1_child0_child1.insertChild(root_child0_child0_child1_child0_child1_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -200,7 +200,7 @@ test("android_news_feed", () => {
expect(root_child0_child0_child1_child0_child1_child1.getComputedWidth()).toBe(0);
expect(root_child0_child0_child1_child0_child1_child1.getComputedHeight()).toBe(0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -287,7 +287,7 @@ test("android_news_feed", () => {
expect(root_child0_child0_child1_child0_child1_child1.getComputedWidth()).toBe(0);
expect(root_child0_child0_child1_child0_child1_child1.getComputedHeight()).toBe(0);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}