You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using loki with the addon-jest to show test-results on the component's storybook page will produce an error.
Packages and versions:
storybook: 7.0.15
adodn-jest: 7.0.15
loki: 0.31.2
Reproduction:
// SampleComponent.stories.tsx
import { Meta, StoryObj } from '@storybook/react'
import results from '../../../.test-results.json'; // jest json output
import { withTests } from '@storybook/addon-jest'
import { SampleComponent } from './SampleComponent'
const meta = {
title: 'Sample Component',
tags: ['autodocs'],
} satisfies Meta<typeof SampleComponent>
export default meta;
type Story = StoryObj<typeof SampleComponent>
export const Sample: Story = {
args: {},
decorators: [withTests({results})],
}
Error message:
FAIL chrome.app/chrome.laptop/Stories/SampleComponent
Sample Component
Failed to render with error "(0 , import_upath.normalize) is not a function"
FAIL chrome.app
Some visual tests failed to run
error Command failed with exit code 1.
Observed results:
Running yarn loki update without the decorator and related imports, the test passes.
Running the storybook with decorators and related imports, storybook works and shows the desired results for it.
Both at the same time will not work and produce the aforementioned error.
I would appreciate if someone could give this a look?
Thanks
The text was updated successfully, but these errors were encountered:
Using loki with the addon-jest to show test-results on the component's storybook page will produce an error.
Packages and versions:
Reproduction:
Error message:
Observed results:
yarn loki update
without the decorator and related imports, the test passes.I would appreciate if someone could give this a look?
Thanks
The text was updated successfully, but these errors were encountered: