Conversation
Comment on lines
+117
to
+131
| test("cadmodel accepts modelBoardNormalDirection and pcbRotationOffset", () => { | ||
| const raw: CadModelPropsInput = { | ||
| modelUrl: "https://example.com/model.stl", | ||
| modelBoardNormalDirection: "z+", | ||
| pcbRotationOffset: 90, | ||
| } | ||
|
|
||
| const parsed = cadmodelProps.parse(raw) as Exclude< | ||
| CadModelPropsInput, | ||
| null | string | ||
| > | ||
|
|
||
| expect(parsed.modelBoardNormalDirection).toBe("z+") | ||
| expect(parsed.pcbRotationOffset).toBe(90) | ||
| }) |
Contributor
There was a problem hiding this comment.
This test file violates the rule that a *.test.ts file may have AT MOST one test(...) function. The file already contains at least one test() function (as evidenced by the existing test ending at line 115), and this diff adds a second test() function starting at line 117. To fix this violation, the new test should be moved to a separate numbered test file, such as 'cadmodel2.test.ts' or similar.
Spotted by Graphite (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
Contributor
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
cadModelAxisDirections,CadModelAxisDirection, andcadModelAxisDirectionto represent model axis directions ("x+","x-","y+","y-","z+","z-").CadModelBasewithmodelBoardNormalDirection?: CadModelAxisDirectionandpcbRotationOffset?: numberand added these to the ZodcadModelBaseschema.tests/cadmodel.test.tsverifying parsing ofmodelBoardNormalDirectionandpcbRotationOffset.generated/COMPONENT_TYPES.mdandgenerated/PROPS_OVERVIEW.mdreflect the new fields and ran project formatting.Testing
bun test tests/cadmodel.test.tswhich passed (8 tests, 0 failures).bunx tsc --noEmitwhich completed successfully with no type errors.bun scripts/generate-component-types.ts,bun scripts/generate-manual-edits-docs.ts,bun scripts/generate-readme-docs.ts, andbun scripts/generate-props-overview.tswhich succeeded and updated generated docs.bun run formatwhich formatted files successfully.Codex Task