1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
market/.storybook/main.js
EnzoVezzaro 89f2521025
Storybook and unit testing setup (#1354)
* install and config Storybook

* create basic component for initial setup

* added testing-library / jest for testing

* restore coverage for testing

* downgrade codeclimate-actions to fix viable formatter issue

* clean up - remove unnecessary components in stories

* update readme with storybook and testing

* remove unnecessary file extensions on stories config

* remove babel and moved jest-dom to devDependencies

* delete introduction stories

* change test to .tsx

* change testing description on docs

* added interface to button story

* added build phase and update test phase

* restore build in ci

* added storyshots (automate testing) to Storybook

* simplify and update codeclimate-action

* restore workable version of codeclimate-action

* test unified test action for CI

* Revert "test unified test action for CI"

This reverts commit 039cbf3485.

* test documented solutions for CI

* fix error on coverage CI

* added codeCoverage on jest setup

* upload coverage report from jest

* added download artifact to coverage CI

* added upload artifact to coverage CI

* remove collectCoverageFrom

* moved test step on CI

* remove coverageLocations to allow default

* load Ocean typography into storybook

* skip all PRs coming from dependabot

* improve docs (Storybook)

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-05-09 14:33:44 +01:00

21 lines
532 B
JavaScript

const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin')
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.tsx'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions'
],
framework: '@storybook/react',
webpackFinal: async (config) => {
config.resolve.plugins = [
...(config.resolve.plugins || []),
new TsconfigPathsPlugin({
extensions: config.resolve.extensions
})
]
return config
}
}