mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
refactor(console): check mermaid by integration test env (#6183)
This commit is contained in:
parent
9b3945a48d
commit
1c90671451
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
import { Theme } from '@logto/schemas';
|
import { Theme } from '@logto/schemas';
|
||||||
import { noop } from '@silverhand/essentials';
|
import { noop, yes } from '@silverhand/essentials';
|
||||||
import { type Mermaid as MermaidType } from 'mermaid';
|
import { type Mermaid as MermaidType } from 'mermaid';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ const loadMermaid = async () => {
|
||||||
return imported.default;
|
return imported.default;
|
||||||
};
|
};
|
||||||
|
|
||||||
const mermaidPromise = process.env.CI
|
const mermaidPromise = yes(process.env.INTEGRATION_TEST)
|
||||||
? // Mock Mermaid in CI to avoid issues with network requests and testing environment.
|
? // Mock Mermaid in integration tests to avoid issues with network requests and testing environment.
|
||||||
Promise.resolve({
|
Promise.resolve({
|
||||||
initialize: noop,
|
initialize: noop,
|
||||||
run: noop,
|
run: noop,
|
||||||
|
|
Loading…
Reference in a new issue