-
Notifications
You must be signed in to change notification settings - Fork 23
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
Find "Find in editor" and value tooltips for decorated statements #2988
Conversation
🦋 Changeset detectedLatest commit: f1005e9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
); | ||
} | ||
|
||
export function undecorated(node: ASTNode) { |
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.
Called "undecorated" and not "undecoratedStatement" because we'll get decorators for KeyValue
pairs in dicts and other nodes soon.
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.
Maybe removeDecorations
?
import { testRun } from "../helpers/helpers.js"; | ||
|
||
describe("SqValue.asJS", () => { | ||
test("SqDict -> Map", async () => { |
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.
minor, but I don't get what this is meant to be testing. "Is instance of object" doesn't tell us much. Please improve the description or 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.
I didn't touch this code, just moved it (from public/SqValue_test.ts
, which was becoming too long and unfocused).
The patch that caused the mismatch from the description is yours: 5c1f624
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.
Ah, makes sense
@@ -39,3 +39,15 @@ export function expectErrorToBeBounded( | |||
const error = distance / normalizingDenom; | |||
expect(error).toBeLessThanOrEqual(epsilon); | |||
} | |||
|
|||
export function assertTag<T extends SqValue["tag"]>( |
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 cute. I might change to assertSqValueTag
or something. I thought this referred to our Tag system at first.
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.
Yeah, it's annoying that native Jest tests don't act as TypeScript guards.
There's some slow progress on Jest and Typescript about that: jestjs/jest#9146, DefinitelyTyped/DefinitelyTyped#41179, microsoft/TypeScript#40562, but it's not quite there yet.
I thought this referred to our Tag system at first.
We probably should rename SqValue.tag
-> SqValue.type
...
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.
Good point
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.
Code looks fine, but:
- I'm not sure what this does. Is it just refactoring, or does it fix things (I think it shows tooltips for decorator statements)? If it's the latter, I'd suggest adding a Changeset. (Either way, a description would have been useful)
- Tests are broken now, though that's not this one's fault. I think
main
is down.
* main: fix components tests by converting ts-jest to jest with babel Create stupid-bananas-look.md tests disallow Foo.bar and Foo as variable names
No description provided.