Files
yoga/javascript/tests/YGFlexBasisAuto.test.js
Dmitry Ivakhnenko ba38a2c784 Flex basis auto is mysteriously missed again (#1225)
Summary:
- adds a test to check that `setFlexBasisAuto` is here

Pull Request resolved: https://github.com/facebook/yoga/pull/1225

Reviewed By: javache

Differential Revision: D43150473

Pulled By: NickGerleman

fbshipit-source-id: b5b82fe4a5db069d3ed5672990c9b8ade9141296
2023-02-09 02:15:43 -08:00

22 lines
561 B
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
test("flex_basis_auto", () => {
const root = Yoga.Node.create();
expect(root.getFlexBasis().unit).toBe(Yoga.UNIT_AUTO);
root.setFlexBasis(10);
expect(root.getFlexBasis().unit).toBe(Yoga.UNIT_POINT);
expect(root.getFlexBasis().value).toBe(10);
root.setFlexBasisAuto();
expect(root.getFlexBasis().unit).toBe(Yoga.UNIT_AUTO);
root.freeRecursive();
});