-
-
Notifications
You must be signed in to change notification settings - Fork 208
chore: 582 - improving test coverage #608
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -571,12 +571,8 @@ function buildArray (context, location) { | |||||
| ` | ||||||
| } | ||||||
|
|
||||||
| if (largeArrayMechanism !== 'default') { | ||||||
| if (largeArrayMechanism === 'json-stringify') { | ||||||
| functionCode += `if (arrayLength && arrayLength >= ${largeArraySize}) return JSON.stringify(obj)\n` | ||||||
| } else { | ||||||
| throw new Error(`Unsupported large array mechanism ${largeArrayMechanism}`) | ||||||
| } | ||||||
| if (largeArrayMechanism === 'json-stringify') { | ||||||
| functionCode += `if (arrayLength && arrayLength >= ${largeArraySize}) return JSON.stringify(obj)\n` | ||||||
| } | ||||||
|
|
||||||
| functionCode += ` | ||||||
|
|
@@ -663,8 +659,6 @@ function buildArrayTypeCondition (type, accessor) { | |||||
| return buildArrayTypeCondition(subType, accessor) | ||||||
| }) | ||||||
| condition = `(${conditions.join(' || ')})` | ||||||
| } else { | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this case is not possible because validation of types
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which line is already handling this already?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 32 in c83cc32
switch
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. concrete line Line 88 in c83cc32
|
||||||
| throw new Error(`${type} unsupported`) | ||||||
| } | ||||||
| } | ||||||
| return condition | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
because
validLargeArrayMechanisms-> this throw will never happen (we get an early throw iflargeArrayMechanismis notdefaultorjson-stringify) so no need for it -> already covered by testsThere 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.
thats true