-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(typings): initial tests for typings #1611
Conversation
@@ -64,7 +64,7 @@ export { default as Flag, FlagProps } from './dist/commonjs/elements/Flag' | |||
|
|||
export { default as Header, HeaderProps } from './dist/commonjs/elements/Header' | |||
export { default as HeaderContent, HeaderContentProps } from './dist/commonjs/elements/Header/HeaderContent' | |||
export { default as HeaderSubheader, HeaderSubHeaderProps } from './dist/commonjs/elements/Header/HeaderSubheader' | |||
export { default as HeaderSubheader, HeaderSubheaderProps } from './dist/commonjs/elements/Header/HeaderSubheader' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed interface name
@@ -15,6 +15,9 @@ export interface BreadcrumbSectionProps { | |||
/** Additional classes. */ | |||
className?: string; | |||
|
|||
/** Shorthand for primary content. */ | |||
content?: any; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing definition
Codecov Report
@@ Coverage Diff @@
## master #1611 +/- ##
=======================================
Coverage 99.74% 99.74%
=======================================
Files 141 141
Lines 2398 2398
=======================================
Hits 2392 2392
Misses 6 6
Continue to review full report at Codecov.
|
@@ -45,6 +45,8 @@ describe('Modal', () => { | |||
}) | |||
|
|||
common.hasSubComponents(Modal, [ModalHeader, ModalContent, ModalActions, ModalDescription]) | |||
common.hasValidTypings(Modal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this might already be covered by the common.isConformant()
test, true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modal-test.js
doesn't contain isConformant
test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, thanks!
Released in |
We have constant problems with typings (#1609 and more), it's time to solve them ✌️
This PR replaces #1181 and offers initial tests for typings. What it does:
Component.d.ts
exists for each component;ComponentProps
interface and it's exported;Component.propTypes
and props that are required in definitions are really required.Also, it fixes all found problems 🥂 Our typiscript users will be satisfied 👍