Skip to content

Commit

Permalink
fix broken unit tests (always mock config)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkunz committed Oct 18, 2023
1 parent d291458 commit 322695c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ services:
- TS_PUBLIC_GHOST_API_URL
- TS_PUBLIC_TYPESENSE_API_KEY
- TS_PUBLIC_TYPESENSE_API_URL
- TS_PUBLIC_DISCORD_URL
- TS_PUBLIC_STRATEGIES
- TS_PUBLIC_WALLET_CONNECT_PROJECT_ID
- TS_PUBLIC_RPC_URLS
Expand Down
3 changes: 0 additions & 3 deletions src/routes/strategies/StrategyTile.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { vi } from 'vitest';
import { render } from '@testing-library/svelte';
import StrategyTile from './StrategyTile.svelte';

vi.mock('$lib/config');

const baseStrategy = {
id: 'strategy_1',
name: 'Strategy 1',
Expand Down
4 changes: 4 additions & 0 deletions test.config.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
import '@testing-library/jest-dom/vitest';
import { vi } from 'vitest';

// always use mock config in unit tests
vi.mock('$lib/config');

0 comments on commit 322695c

Please sign in to comment.