Skip to content

Commit

Permalink
Fix missing default params (#153)
Browse files Browse the repository at this point in the history
* Fix missing default params

* update test
  • Loading branch information
ewgenius authored Apr 26, 2024
1 parent f2243ce commit 1598344
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SpiceClient {
private _flight_tls_enabled: boolean = true;
private _maxRetries: number = retry.FLIGHT_QUERY_MAX_RETRIES;

public constructor(params: string | SpiceClientConfig) {
public constructor(params: string | SpiceClientConfig = {}) {
// support legacy constructor with api_key as first agument
if (typeof params === 'string') {
this._apiKey = params;
Expand Down
2 changes: 1 addition & 1 deletion test/local-runtime.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SpiceClient } from '../';

describe('local', () => {
const client = new SpiceClient({});
const client = new SpiceClient();

it('connection and query to local spice runtime works', async () => {
const tableResult = await client.query(
Expand Down

0 comments on commit 1598344

Please sign in to comment.