Skip to content

test(nextjs): Update type cast for integration test #3930

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

Merged
merged 2 commits into from
Aug 27, 2021

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Aug 27, 2021

Currently on master tests are failing with:

./pages/users/[id].tsx:55:31
Type error: Object is of type 'unknown'.

  53 |     return { props: { item } };
  54 |   } catch (err) {
> 55 |     return { props: { errors: err.message } };
     |                               ^
  56 |   }
  57 | };
  58 |

To fix this, we cast err to Error type.

Currently on master tests are failing with:

./pages/users/[id].tsx:55:31
Type error: Object is of type 'unknown'.

  53 |     return { props: { item } };
  54 |   } catch (err) {
> 55 |     return { props: { errors: err.message } };
     |                               ^
  56 |   }
  57 | };
  58 |

To fix this, we cast err to `any` type.
@AbhiPrasad AbhiPrasad changed the title test(nextjs): Update type cast to integration test test(nextjs): Update type cast for integration test Aug 27, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 27, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 21.57 KB (+0.01% 🔺)
@sentry/browser - Webpack 22.57 KB (0%)
@sentry/react - Webpack 22.6 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29 KB (+0.01% 🔺)

@AbhiPrasad AbhiPrasad merged commit 8fb33b0 into master Aug 27, 2021
@AbhiPrasad AbhiPrasad deleted the abhi-fix-next-types branch August 27, 2021 14:57
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