Skip to content

Conversation

@techmannih
Copy link
Member

@techmannih techmannih commented Sep 13, 2025

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you adding in as any?

expect(typeof c.lcsc).toBe("number")
if ("key" in c) {
expect(typeof c.key).toBe("string")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NEVER HAVE CONDITIONAL ASSERTIONS IN TESTS!

const components = fullComponents.map((c) => ({
const fullWithBasic = fullComponents.map((c) => {
const { basic, ...rest } = c
return { ...rest, is_basic_part: basic === 1 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do this in the sql

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to set is_basic_part in the database like all the other properties, not remap

? null
: {
...c,
is_basic_part: components[i].basic === 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this property special? Don't remap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants