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

Test size estimations #21

Open
JoshuaKGoldberg opened this issue Nov 29, 2017 · 0 comments
Open

Test size estimations #21

JoshuaKGoldberg opened this issue Nov 29, 2017 · 0 comments

Comments

@JoshuaKGoldberg
Copy link
Member

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
    });
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant