Skip to content

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

464 B
Raw Blame
import { DEFAULT_INTERACTIVE_EMBEDDING_OPTIONS } from "metabase/redux/embed";
import type {
  EmbedState,
  InteractiveEmbeddingOptions,
} from "metabase/redux/store";

export const createMockEmbedOptions = (
  opts?: Partial<InteractiveEmbeddingOptions>,
) => ({
  ...DEFAULT_INTERACTIVE_EMBEDDING_OPTIONS,
  ...opts,
});

export const createMockEmbedState = (
  opts?: Partial<EmbedState>,
): EmbedState => ({
  options: createMockEmbedOptions(),
  ...opts,
});