Skip to content

Commit

Permalink
Fix types and remove deprecated APIs in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Jan 10, 2024
1 parent 0e598f8 commit 9bdddc8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { describe, beforeEach, it, expect, vi } from 'vitest';
import React from 'react';
import { global } from '@storybook/global';
import type { RenderContext } from '@storybook/types';
import { addons, mockChannel as createMockChannel } from '../addons';
import { addons } from '../addons';

import { PreviewWeb } from './PreviewWeb';
import { WebView } from './WebView';
Expand Down Expand Up @@ -67,7 +67,6 @@ beforeEach(() => {
// projectAnnotations.parameters.docs.renderer = () => new DocsRenderer() as any;

addons.setChannel(mockChannel as any);
addons.setServerChannel(createMockChannel());

vi.mocked(WebView.prototype).prepareForDocs.mockReturnValue('docs-element' as any);
vi.mocked(WebView.prototype).prepareForStory.mockReturnValue('story-element' as any);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ beforeEach(() => {
mockStoryIndex.mockReset().mockReturnValue(storyIndex);

addons.setChannel(mockChannel as any);
addons.setServerChannel(createMockChannel());
mockFetchResult = { status: 200, json: mockStoryIndex, text: () => 'error text' };

vi.mocked(WebView.prototype).prepareForDocs.mockReturnValue('docs-element' as any);
Expand Down

0 comments on commit 9bdddc8

Please sign in to comment.