Skip to content

[Bug]: test-runner all stories passed, but no display test coverage #509

Open
@Lee-NG915

Description

@Lee-NG915

Describe the bug

SCR-20240829-rcll
In a monorepo project, all stories passed test-runner, and i have a file named Accordion.test.tsx ,It is a simple unit test, but now i run
pnpm exec nx run fortress:test-storybook --url http://localhost:53348/ --coverage

result is:
image

To Reproduce

// AccordionGroup.test.tsx
import { fireEvent, screen } from '@testing-library/react';

import { composeStory } from '@storybook/react';

import meta, { Basic as ValidFormStory } from './AccordionGroup.stories';

const ValidForm = composeStory(ValidFormStory, meta);

test('Validates form', async () => {
console.log('ValidForm', ValidForm);
});

System

mac 14.5
storybook 7.6
@storybook/addon-coverage": "^1.0.4"
    "@storybook/addon-a11y": "^7.6.17",
    "@storybook/addon-designs": "^7.0.9",
    "@storybook/addon-essentials": "7.6.20",
    "@storybook/addon-interactions": "^7.6.20",
    "@storybook/addon-storysource": "^7.6.17",
    "@storybook/addon-themes": "^7.6.17",
    "@storybook/addon-viewport": "^7.6.17",
    "@storybook/blocks": "^7.6.17",
    "@storybook/core-server": "7.6.20",
    "@storybook/jest": "^0.2.3",
    "@storybook/manager-api": "^7.6.17",
    "@storybook/nextjs": "7.6.20",
    "@storybook/react": "^7.6.17",
    "@storybook/react-vite": "7.6.17",
    "@storybook/test": "^7.6.20",
    "@storybook/test-runner": "^0.16.0",
    "@storybook/testing-library": "^0.2.2",
    "@storybook/theming": "^7.6.17",

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions