Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

543 B
Raw Blame
import type {
  MetabaseAuthConfig,
  MetabaseAuthConfigWithApiKey,
} from "embedding-sdk-bundle/types";

import { MOCK_INSTANCE_URL } from "./sso";

export const createMockSdkConfig = (
  opts: Partial<MetabaseAuthConfig> = {},
): MetabaseAuthConfig => ({
  metabaseInstanceUrl: MOCK_INSTANCE_URL,
  ...opts,
});

export const createMockApiKeyConfig = ({
  apiKey = "TEST_API_KEY",
  ...opts
}: Partial<MetabaseAuthConfigWithApiKey> = {}): MetabaseAuthConfigWithApiKey => ({
  apiKey,
  metabaseInstanceUrl: MOCK_INSTANCE_URL,
  ...opts,
});