Skip to content

Commit

Permalink
fix: Make header required and use it in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KW-clickbits committed May 7, 2021
1 parent dce2b7e commit a028311
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/internals/utilities/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type Authentication = {
};

export type Config = {
appIdentifier?: string;
appIdentifier: string;
authentication?: Authentication;
baseUrl?: string;
};
Expand All @@ -41,8 +41,12 @@ export class Api {
},
});

constructor({ baseUrl = DEFAULT_BASE_URL, authentication }: Config) {
this.config({ authentication, baseUrl });
constructor({
baseUrl = DEFAULT_BASE_URL,
authentication,
appIdentifier,
}: Config) {
this.config({ appIdentifier, authentication, baseUrl });
}

config = (config: Config) => {
Expand Down
1 change: 1 addition & 0 deletions tests/integration/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const hasCredentials =
user: process.env.CLOCKODO_USER!,
apiKey: process.env.CLOCKODO_API_KEY!,
},
appIdentifier: "Clockodo-SDK Integration Test"
});
});

Expand Down

0 comments on commit a028311

Please sign in to comment.