Repository navigation
Conversation
…helper Add getPageActionTool, which finds a page action tool by name and throws a descriptive error if it's missing, and use it in page-actions.test.ts instead of `find(...)!`. Clears the lint/style/noNonNullAssertion warnings in that file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@eli7pm is attempting to deploy a commit to the Runway Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Summary
page-actions.test.tslooked up tools withpageActionTools.find(...)!, which triggers threelint/style/noNonNullAssertionwarnings frombun run lint.This adds a small helper,
getPageActionTool(name), inpackages/core/src/utils/. It returns the tool with that name, or throwsMissing page action tool: <name>if there isn't one. The test now uses it in place of the three assertions, so a missing tool fails with a clear message instead of aTypeErroronundefined.The helper is only used by tests. It isn't exported from the package and doesn't end up in the built bundles.
Changes
packages/core/src/utils/getPageActionTool.ts: new helperpackages/core/src/utils/getPageActionTool.test.ts: tests for the helper (finds by name, returns the same object aspageActionTools, throws on an unknown name)packages/core/src/api/page-actions.test.ts: uses the helper instead offind(...)!Testing
bun test packages/core/src/api/page-actions.test.ts packages/core/src/utils/getPageActionTool.test.ts: 12 passcd packages/core && bun run typecheck: cleanbiome linton the changed files: no warnings