fix: test

This commit is contained in:
fushen 2019-12-31 11:03:34 +08:00
parent 145e9ff779
commit b23ba56999
3 changed files with 0 additions and 23 deletions

View File

@ -13,7 +13,6 @@ module.exports = {
'@storybook/addon-backgrounds/register',
'@storybook/addon-contexts/register',
'@storybook/addon-a11y/register',
'@storybook/addon-jest/register',
],
webpack: async config => ({
...config,
@ -27,10 +26,6 @@ module.exports = {
include: [path.resolve(__dirname, '../src')],
enforce: 'pre',
},
{
test: /\.css$/,
use: [require.resolve('stylesheet-loader')],
},
],
},
}),

View File

@ -4,10 +4,8 @@
"private": true,
"scripts": {
"build": "build-scripts build",
"prebuild-storybook": "yarn test:generate-output",
"build-storybook": "build-storybook -s public",
"start": "build-scripts start",
"prestorybook": "yarn test:generate-output",
"storybook": "start-storybook -p 9009 -s public",
"test": "jest --logHeapUsage --detectOpenHandles"
},

View File

@ -1,16 +0,0 @@
import { createElement } from 'rax';
import { withTests } from '@storybook/addon-jest';
import { App } from '../components/App';
// eslint-disable-next-line
import results from '../../jest-test-results.json';
export default {
title: 'Addon/addon-jest',
decorators: [withTests({ results })],
};
export const app = () => <App />;
app.story = {
name: 'App',
parameters: { jest: ['components/App/App.test.js'] },
};