Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format
  • Loading branch information
max-stytch committed Feb 15, 2023
commit ff2686e7cd70670c59e2cb78f80e709bed4513ed
2 changes: 1 addition & 1 deletion lib/b2c/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Client extends BaseClient {
cryptoWallets: CryptoWallets;

constructor(config: ClientConfig) {
super(config)
super(config);

const jwtConfig = {
// Only allow JWTs that were meant for this project.
Expand Down
4 changes: 1 addition & 3 deletions lib/shared/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export interface ClientConfig {
agent?: http.Agent;
}


export class BaseClient {
protected fetchConfig: fetchConfig;
protected baseURL: string;
Expand Down Expand Up @@ -61,5 +60,4 @@ export class BaseClient {
this.baseURL += "/";
}
}

}
}
10 changes: 7 additions & 3 deletions test/b2b/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ describe("B2B Client", () => {

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
expect(testClient.fetchConfig.baseURL).toBe("https://test.stytch.com/v1/b2b/")
expect(testClient.fetchConfig.baseURL).toBe(
"https://test.stytch.com/v1/b2b/"
);

const liveClient = new stytch.B2BClient({
project_id: "project-test-00000000-0000-4000-8000-000000000000",
Expand All @@ -20,6 +22,8 @@ describe("B2B Client", () => {

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
expect(liveClient.fetchConfig.baseURL).toBe("https://api.stytch.com/v1/b2b/")
})
expect(liveClient.fetchConfig.baseURL).toBe(
"https://api.stytch.com/v1/b2b/"
);
});
});
2 changes: 1 addition & 1 deletion test/shared/client.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as stytch from "../../lib";
import { BaseClient, } from "../../lib/shared/client";
import { BaseClient } from "../../lib/shared/client";

describe("config errors", () => {
test("config is not an object", () => {
Expand Down