Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Test size estimations #21

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

These require before/after functions to set up DOM elements. I haven't checked if those work in gulp-shenanigans yet.

it("estimates a rounded size once the menu area is created", async () => {
    // Arrange
    const roughMenuSize: IAbsoluteSizeSchema = {
        height: 140.1,
        width: 210.1
    };
    const areasFaker = stubAreasFaker({
        styles: {
            ...stubStyles,
            innerArea: {
                height: `${roughMenuSize.height}px`,
                width: `${roughMenuSize.width}px`
            }
        }
    });

    // Act
    const { menuSize } = await areasFaker.createAndAppendMenuArea(stubContainerSize);

    // Assert
    expect(menuSize).to.be.equal({
        height: 140,
        width: 210
    });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions