Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(console): check mermaid by integration test env #6183

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions packages/console/src/mdx-components/Mermaid/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Theme } from '@logto/schemas';
import { noop } from '@silverhand/essentials';
import { noop, yes } from '@silverhand/essentials';
import { type Mermaid as MermaidType } from 'mermaid';
import { useEffect } from 'react';

Expand All @@ -21,8 +21,8 @@ const loadMermaid = async () => {
return imported.default;
};

const mermaidPromise = process.env.CI
? // Mock Mermaid in CI to avoid issues with network requests and testing environment.
const mermaidPromise = yes(process.env.INTEGRATION_TEST)
? // Mock Mermaid in integration tests to avoid issues with network requests and testing environment.
Promise.resolve({
initialize: noop,
run: noop,
Expand Down
Loading