Skip to content

Commit

Permalink
test: remove unprefixed elements from tests
Browse files Browse the repository at this point in the history
Signed-off-by: Trezy <[email protected]>
  • Loading branch information
trezy committed Dec 31, 2024
1 parent 18cbb93 commit 2e0981d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/unit/typedefs/PixiElements.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ describe('PixiElements', () =>
it('applies children and props', () =>
{
const elements = (
<container>
<graphics draw={(_: Graphics) => { /* noop */ }} />
<sprite texture={Texture.EMPTY} />
<alphaFilter alpha={0.5} />
<pixiContainer>
<pixiGraphics draw={(_: Graphics) => { /* noop */ }} />
<pixiSprite texture={Texture.EMPTY} />
<pixiAlphaFilter alpha={0.5} />
<pixiText anchor={{ x: 0.5, y: 0.5 }} text="Hello, World!" />
</container>
</pixiContainer>
);

expect(elements.props.children).toHaveLength(4);

expect(elements.props.children[0].type).toEqual('graphics');
expect(elements.props.children[0].type).toEqual('pixiGraphics');
expect(elements.props.children[0].props.draw).toBeTypeOf('function');

expect(elements.props.children[1].type).toEqual('sprite');
expect(elements.props.children[1].type).toEqual('pixiSprite');
expect(elements.props.children[1].props.draw).toBeUndefined();
expect(elements.props.children[1].props.texture).toBeInstanceOf(Texture);

expect(elements.props.children[2].type).toEqual('alphaFilter');
expect(elements.props.children[2].type).toEqual('pixiAlphaFilter');
expect(elements.props.children[2].props.alpha).toEqual(0.5);

expect(elements.props.children[3].type).toEqual('pixiText');
Expand Down

0 comments on commit 2e0981d

Please sign in to comment.