geometry-test.js — react Source File
Architecture documentation for geometry-test.js, a javascript file in the react codebase. 10 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 81e6e62a_029e_26ae_c156_923afbde7654["geometry-test.js"] 1d481b0c_03e1_6f28_eff1_74d4566b3dc8["geometry.js"] 81e6e62a_029e_26ae_c156_923afbde7654 --> 1d481b0c_03e1_6f28_eff1_74d4566b3dc8 64ba89b2_8706_1662_2b26_638335c14f41["pointEqualToPoint"] 81e6e62a_029e_26ae_c156_923afbde7654 --> 64ba89b2_8706_1662_2b26_638335c14f41 9e435ec9_ef4f_d03e_18e0_9d64901cba58["sizeEqualToSize"] 81e6e62a_029e_26ae_c156_923afbde7654 --> 9e435ec9_ef4f_d03e_18e0_9d64901cba58 fded0f25_5cd2_d798_b8aa_4355c4344173["rectEqualToRect"] 81e6e62a_029e_26ae_c156_923afbde7654 --> fded0f25_5cd2_d798_b8aa_4355c4344173 6ff899dd_2b02_6c39_6e99_5dd10b9c9b5b["sizeIsValid"] 81e6e62a_029e_26ae_c156_923afbde7654 --> 6ff899dd_2b02_6c39_6e99_5dd10b9c9b5b a7130a11_ed5e_dbc4_2ed2_a41628c43f8c["sizeIsEmpty"] 81e6e62a_029e_26ae_c156_923afbde7654 --> a7130a11_ed5e_dbc4_2ed2_a41628c43f8c ee345723_5d2c_09fe_13aa_8bc6e840e369["rectIntersectsRect"] 81e6e62a_029e_26ae_c156_923afbde7654 --> ee345723_5d2c_09fe_13aa_8bc6e840e369 9ca9174f_303e_0f6b_0371_0eaf35e67cb8["intersectionOfRects"] 81e6e62a_029e_26ae_c156_923afbde7654 --> 9ca9174f_303e_0f6b_0371_0eaf35e67cb8 5cadbad4_62d2_f23e_1bf4_225db867ed8b["rectContainsPoint"] 81e6e62a_029e_26ae_c156_923afbde7654 --> 5cadbad4_62d2_f23e_1bf4_225db867ed8b 4f0df6ba_57ab_cc88_9a94_1bc63bfad061["unionOfRects"] 81e6e62a_029e_26ae_c156_923afbde7654 --> 4f0df6ba_57ab_cc88_9a94_1bc63bfad061 style 81e6e62a_029e_26ae_c156_923afbde7654 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* 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.
*
* @flow
*/
import {
pointEqualToPoint,
sizeEqualToSize,
rectEqualToRect,
sizeIsValid,
sizeIsEmpty,
rectIntersectsRect,
intersectionOfRects,
rectContainsPoint,
unionOfRects,
} from '../geometry';
describe('pointEqualToPoint', () => {
it('should return true when 2 points have the same values', () => {
expect(pointEqualToPoint({x: 1, y: 1}, {x: 1, y: 1})).toBe(true);
expect(pointEqualToPoint({x: -1, y: 2}, {x: -1, y: 2})).toBe(true);
expect(
pointEqualToPoint({x: 3.14159, y: 0.26535}, {x: 3.14159, y: 0.26535}),
).toBe(true);
});
it('should return false when 2 points have different values', () => {
expect(pointEqualToPoint({x: 1, y: 1}, {x: 1, y: 0})).toBe(false);
expect(pointEqualToPoint({x: -1, y: 2}, {x: 0, y: 1})).toBe(false);
expect(
pointEqualToPoint({x: 3.1416, y: 0.26534}, {x: 3.14159, y: 0.26535}),
).toBe(false);
});
});
describe('sizeEqualToSize', () => {
it('should return true when 2 sizes have the same values', () => {
expect(sizeEqualToSize({width: 1, height: 1}, {width: 1, height: 1})).toBe(
true,
);
expect(
sizeEqualToSize({width: -1, height: 2}, {width: -1, height: 2}),
).toBe(true);
expect(
sizeEqualToSize(
{width: 3.14159, height: 0.26535},
{width: 3.14159, height: 0.26535},
),
).toBe(true);
});
it('should return false when 2 sizes have different values', () => {
expect(sizeEqualToSize({width: 1, height: 1}, {width: 1, height: 0})).toBe(
false,
);
expect(sizeEqualToSize({width: -1, height: 2}, {width: 0, height: 1})).toBe(
// ... (213 more lines)
Domain
Dependencies
Source
Frequently Asked Questions
What does geometry-test.js do?
geometry-test.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does geometry-test.js depend on?
geometry-test.js imports 10 module(s): geometry.js, intersectionOfRects, pointEqualToPoint, rectContainsPoint, rectEqualToRect, rectIntersectsRect, sizeEqualToSize, sizeIsEmpty, and 2 more.
Where is geometry-test.js in the architecture?
geometry-test.js is located at packages/react-devtools-timeline/src/view-base/__tests__/geometry-test.js (domain: BabelCompiler, directory: packages/react-devtools-timeline/src/view-base/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free