Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storybook upgrade from 5.1.1 -> 5.2.1, specs block not executed #120

Open
engelmav opened this issue Sep 17, 2019 · 0 comments
Open

storybook upgrade from 5.1.1 -> 5.2.1, specs block not executed #120

engelmav opened this issue Sep 17, 2019 · 0 comments

Comments

@engelmav
Copy link

Hello,

After storybook upgrade from 5.1.1 to 5.2.1, the specs function (or it function) is either not executed or failing silently somewhere, because the assignments that happen within the it block are not happening.

Example:

  // storiesOf() above here
  .add('after changing state',
    () => {
      configure({ adapter: new Adapter() });
      const story = <MyComponent {...someProps} />;
      let output;

      specs(() => describe('Classification', function () {
        it('Component state change', function () {
          output = mount(story);
          output.setProps({ someProps });
          output.setState({ someState: stateData });
        });
      }));
      const Inst = () => output.instance();
      return <Inst {...someProps} />;
    }
  );

When viewing this in storybook UI, I see TypeError: Cannot read property 'instance' of undefined.

Do I need to change how I invoke the specifications addon for this version of storybook, or is this a breaking change on storybook's side?

I'm happy to contribute a bugfix if someone can point me to where the specification addon interfaces with storybook for specs/it loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant