mthuret / storybook-addon-specifications

:book: Write tests next to your stories and display their results inside storybook interface
457 stars 54 forks source link

Usage with Mocha #34

Open gregorskii opened 7 years ago

gregorskii commented 7 years ago

Hi there,

I am trying to make this work with Mocha, Enzyme, and Chai-Jasmine.

I think I have the facades configured correctly but when I import my Mocha test file it does not hook into the specs function on Storybook.

The section on Mocha says you can import tests directly from test files, but it switches back to talking about Jest. Is this possible with Mocha tests?

I have a boilerplate project where I am debugging it here:

https://github.com/gregorskii/redux-starter

Where I have made the necessary configs files:

.storybook/facade.js:

https://github.com/gregorskii/redux-starter/blob/master/.storybook/facade.js

Mocha Config Helper:

https://github.com/gregorskii/redux-starter/blob/master/test/unit/spec/helpers/storybook.js

Storybook File:

https://github.com/gregorskii/redux-starter/blob/master/src/components/welcome/welcome-storybook.jsx

Do you think you can provide some guidance on how to get this working/ if this config should/will work?

Thanks!

gregorskii commented 7 years ago

Hey, did you have a chance to review this? :)