Common front-end components for Web using the Tesseract design system, written for React. https://make.modal.sh/tesseract/web/react/common
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

extensions.ts 294 B

1234567891011121314
  1. import ReactIs from 'react-is'
  2. declare global {
  3. namespace jest {
  4. interface Matchers<R> {
  5. toBeComponent(): R,
  6. }
  7. }
  8. }
  9. export const toBeComponent = (received: any) => ({
  10. message: () => `expected ${received} to be a component`,
  11. pass: ReactIs.isValidElementType(received),
  12. })