Skip to content

Commit

Permalink
add unit test. fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vafada committed Nov 6, 2024
1 parent 011d4ca commit c2d7404
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/justify-content/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import './justify-content';
import './justify-content.js';
11 changes: 11 additions & 0 deletions test/flex-justify-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ test('row - align two text nodes on the edges', t => {
t.is(output, 'A B');
});

test('row - space evenly two text nodes', t => {
const output = renderToString(
<Box justifyContent="space-evenly" width={10}>
<Text>A</Text>
<Text>B</Text>
</Box>,
);

t.is(output, ' A B');
});

// Yoga has a bug, where first child in a container with space-around doesn't have
// the correct X coordinate and measure function is used on that child node
test.failing('row - align two text nodes with equal space around them', t => {
Expand Down

0 comments on commit c2d7404

Please sign in to comment.