Skip to content

Theme switch doesn't work and test's fail #3

Open
@ibayer

Description

@ibayer

Thanks for the example!
Will trying it out (npm -version 6.4.1)

git clone https://github.com/react-theming/create-material-ui-app.git
cd create-material-ui-app
npm install
npm run storybook

I ran into two issues:

  1. The rendered component don't change if I switch between light and dark theme.

  2. The test fails

 FAIL  src/Storyshots.test.js
  Test suite failed to run

    Cannot find module '@storybook/addon-storyshots' from 'Storyshots.test.js'

    > 1 | const initStoryshots = require('@storybook/addon-storyshots').default
        |                        ^
      2 | initStoryshots()
      3 | 

      at Resolver.resolveModule (node_modules/jest-runtime/node_modules/jest-resolve/build/index.js:230:17)
      at Object.require (src/Storyshots.test.js:1:24)

 PASS  src/App.test.js

Test Suites: 1 failed, 1 passed, 2 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        1.167s
Ran all test suites.

Watch Usage: Press w to show more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions