Skip to content

Commit

Permalink
fix: lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarowolfx committed Jan 24, 2024
1 parent 3ae7738 commit f4c966a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ export class BigQuery extends Service {
},
{}
);
} else if (typeName === 'JSON' && is.object(value)) {
} else if (typeName === 'JSON' && is.object(value)) {
queryParameter.parameterValue!.value = JSON.stringify(value);
} else {
queryParameter.parameterValue!.value = BigQuery._getValue(
Expand Down
23 changes: 13 additions & 10 deletions test/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1525,8 +1525,8 @@ describe('BigQuery', () => {
const typeName = 'JSON';
const value = {
foo: 'bar',
}
const strValue = JSON.stringify(value)
};
const strValue = JSON.stringify(value);
assert.deepStrictEqual(BigQuery.valueToQueryParameter_(value, typeName), {
parameterType: {
type: typeName,
Expand All @@ -1535,14 +1535,17 @@ describe('BigQuery', () => {
value: strValue,
},
});
assert.deepStrictEqual(BigQuery.valueToQueryParameter_(strValue, typeName), {
parameterType: {
type: typeName,
},
parameterValue: {
value: strValue,
},
});
assert.deepStrictEqual(
BigQuery.valueToQueryParameter_(strValue, typeName),
{
parameterType: {
type: typeName,
},
parameterValue: {
value: strValue,
},
}
);
});

it('should format all other types', () => {
Expand Down

0 comments on commit f4c966a

Please sign in to comment.