mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
Fix some DeepScan issues
This commit is contained in:
parent
574570554a
commit
976e30d5d5
@ -93,7 +93,7 @@ describe('core.preview.StoryRenderer', () => {
|
||||
);
|
||||
|
||||
// the render function does something async so we need to jump to the end of the promise queue
|
||||
await null;
|
||||
await Promise.resolve(null);
|
||||
|
||||
expect(onStoryRendered).toHaveBeenCalledWith('a--1');
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { Context } from 'react';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { document } from 'global';
|
||||
import AnsiToHtml from 'ansi-to-html';
|
||||
@ -89,7 +89,7 @@ export class StoryRenderer {
|
||||
const { storyId, viewMode: urlViewMode } = storyStore.getSelection();
|
||||
|
||||
const data = storyStore.fromId(storyId);
|
||||
const { kind, name, id, parameters = {} } = data || {};
|
||||
const { kind, id, parameters = {} } = data || {};
|
||||
const { docsOnly, layout } = parameters;
|
||||
|
||||
const metadata: RenderMetadata = {
|
||||
@ -121,7 +121,7 @@ export class StoryRenderer {
|
||||
metadata: RenderMetadata;
|
||||
context: RenderContext;
|
||||
}) {
|
||||
const { forceRender, kind, name } = context;
|
||||
const { forceRender, name } = context;
|
||||
|
||||
const { previousMetadata } = this;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { history, document, window } from 'global';
|
||||
import { document, window } from 'global';
|
||||
|
||||
import Events from '@storybook/core-events';
|
||||
import start from './start';
|
||||
|
||||
jest.mock('@storybook/client-logger');
|
||||
|
Loading…
x
Reference in New Issue
Block a user