Common front-end components for Web using the Tesseract design system, written for React. https://make.modal.sh/tesseract/web/react/common
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

15 行
294 B

  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. })