-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Migrate to the new documenter API #82
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
base: main
Are you sure you want to change the base?
Conversation
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.
lol, this time I did not assign you :D
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #82 +/- ##
=======================================
Coverage 99.28% 99.28%
=======================================
Files 29 29
Lines 280 280
Branches 34 34
=======================================
Hits 278 278
Misses 1 1
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -2,9 +2,16 @@ | |||
// SPDX-License-Identifier: Apache-2.0 | |||
import { expect, test } from "vitest"; | |||
|
|||
// @ts-expect-error no types here | |||
import apiDocs from "../../lib/components/internal/api-docs/components"; | |||
import componentDefinitions from "../../lib/components/internal/api-docs/components"; |
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.
decided to follow how we define the documenter tests everywhere by using the getAllComponents
util
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.
thanks
135f176
to
9c7f0c3
Compare
// overriding with a fake value so that when there are icon changes in components this test doesn't block it | ||
const iconNameDefinition = definition.properties.find(({ name }: { name: string }) => name === "iconName"); | ||
if (iconNameDefinition && iconNameDefinition.inlineType?.type === "union") { | ||
iconNameDefinition.inlineType.values = ["comes from @cloudscape-design/components"]; | ||
} |
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.
This is not needed in this package
We can add it later, if we really start using icons in snapshots
/* eslint-env node */ | ||
/* eslint-disable header/header */ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 |
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.
If you put comments in this order, they pass the linter without disabling
/* eslint-env node */ | |
/* eslint-disable header/header */ | |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
// SPDX-License-Identifier: Apache-2.0 | |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
// SPDX-License-Identifier: Apache-2.0 | |
/* eslint-env node */ |
Description
Same as cloudscape-design/components#3475 and cloudscape-design/chat-components#72 but for this package
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.