Skip to content

Commit

Permalink
test(react-component-tsx): update test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 19, 2023
1 parent f73d1ee commit 7c1dd4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/react-component-tsx/test/index.test.tsx
Expand Up @@ -13,10 +13,10 @@ describe('<Button />', () => {
if (tree) {
expect(tree.type).toBe('button');
expect(tree.props.className).toBe('w-btn w-btn-default w-btn-danger');
expect(tree.children).toHaveLength(1);
expect(tree.children).toHaveLength(2);
if (tree.children) {
expect(tree.children[0].type).toBe('span');
expect(tree.children[0].children[0]).toEqual('BUTTON');
expect(tree.children[0].type).toBe('img');
expect(tree.children[0].children).toBeNull();
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion examples/react-component-tsx/tsconfig.json
Expand Up @@ -24,7 +24,7 @@
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,

"noEmit": true,
"emitDeclarationOnly": true,
"types": ["jest", "node"]
},
"include": ["./src/**/*"],
Expand Down

0 comments on commit 7c1dd4c

Please sign in to comment.