Skip to content

Commit

Permalink
chore: fixes integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
feugy committed Oct 14, 2023
1 parent 0dac733 commit 61de453
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions apps/web/src/stores/graphql-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,17 @@ function processErrors(
* @returns deserialized value.
*/
function deserialize(value) {
const obj = /** @type {Record<string, ?> & {schema?: ?, preferences?: ?}} */ (
value
)
if ('schemaString' in obj) {
obj.schema = JSON.parse(obj.schemaString)
delete obj.schemaString
}
if ('preferencesString' in obj) {
obj.preferences = JSON.parse(obj.preferencesString)
delete obj.preferencesString
if (value) {
const obj =
/** @type {Record<string, ?> & {schema?: ?, preferences?: ?}} */ (value)
if ('schemaString' in obj) {
obj.schema = JSON.parse(obj.schemaString)
delete obj.schemaString
}
if ('preferencesString' in obj) {
obj.preferences = JSON.parse(obj.preferencesString)
delete obj.preferencesString
}
}
return value
}
2 changes: 1 addition & 1 deletion apps/web/tests/integration/utils/coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const reporters = [
{ name: 'lcov' }
]
const previewURL = 'https://localhost:3000'
const distFolder = join('dist', 'unused/unused')
const distFolder = join('.vercel', 'output/static')
const srcFolder = resolve(__filename, '../../../../src')

export async function initializeCoverage() {
Expand Down

0 comments on commit 61de453

Please sign in to comment.