1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

added storyshots (automate testing) to Storybook

This commit is contained in:
Enzo Vezzaro 2022-04-25 08:08:53 -04:00
parent 40d485ea91
commit c0eba64557
3 changed files with 1968 additions and 4300 deletions

View File

@ -0,0 +1,14 @@
import initStoryshots from '@storybook/addon-storyshots'
import { render, waitFor } from '@testing-library/react'
// Stories are render-tested with @testing-library/react,
// overwriting default snapshot testing behavior
initStoryshots({
asyncJest: true,
test: async ({ story, done }) => {
const storyElement = story.render()
// render the story with @testing-library/react
render(storyElement)
await waitFor(() => done())
}
})

6253
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@
"@oceanprotocol/lib": "^1.0.0-next.35",
"@oceanprotocol/typographies": "^0.1.0",
"@portis/web3": "^4.0.7",
"@storybook/addon-storyshots": "^6.4.22",
"@tippyjs/react": "^4.2.6",
"@urql/exchange-refocus": "^0.2.5",
"@walletconnect/web3-provider": "^1.7.6",