Skip to content
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

CI seems to be failing #175

Closed
mcollina opened this issue Dec 18, 2023 · 4 comments · Fixed by #177 · May be fixed by #176
Closed

CI seems to be failing #175

mcollina opened this issue Dec 18, 2023 · 4 comments · Fixed by #177 · May be fixed by #176
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mcollina
Copy link
Member

Can somebody take a look?

@mcollina mcollina added the help wanted Extra attention is needed label Dec 18, 2023
@Eomm
Copy link
Member

Eomm commented Dec 18, 2023

It is related to:
fastify/fastify#5056

Since we don't return anymore the content-type, when we execute .json()

expect(response.json().storedValue).toBe('testValue1')

It triggers and error

https://github.com/fastify/light-my-request/blob/a74e716656f366ea7743a10433116cbbefff6dd7/lib/response.js#L143

> JSON.parse('')
Uncaught SyntaxError: Unexpected end of JSON input

We need to update our test suite

@Eomm Eomm added the good first issue Good for newcomers label Dec 18, 2023
@shawshankkumar
Copy link

shawshankkumar commented Dec 18, 2023

It is related to: fastify/fastify#5056

Since we don't return anymore the content-type, when we execute .json()

expect(response.json().storedValue).toBe('testValue1')

It triggers and error

https://github.com/fastify/light-my-request/blob/a74e716656f366ea7743a10433116cbbefff6dd7/lib/response.js#L143

> JSON.parse('')
Uncaught SyntaxError: Unexpected end of JSON input

We need to update our test suite

Hi @Eomm ! Attempting to do this. Will make a draft pr once I figure it out, is that fine? Thanks!

update: made a pr #176

@alfonsograziano
Copy link
Contributor

@shawshankkumar I found a solution but the linting is failing for me. Do you have the same issue? I'm getting 'use strict' is unnecessary inside of modules

@shawshankkumar
Copy link

@shawshankkumar I found a solution but the linting is failing for me. Do you have the same issue? I'm getting 'use strict' is unnecessary inside of modules

hey @alfonsograziano no, i am not getting any such errors, can you post a screenshot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
4 participants