Skip to content
New issue

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

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

Already on GitHub? # to your account

Add storyshots #14

Open
Kushagra8888 opened this issue May 3, 2019 · 0 comments
Open

Add storyshots #14

Kushagra8888 opened this issue May 3, 2019 · 0 comments

Comments

@Kushagra8888
Copy link
Contributor

https://storybook.js.org/docs/testing/structural-testing/

Since we are already using storybooks, the stories can be used as jest snaphost test using this addon. I've attempted to integrate it but encountered some issues which I could not resolve...

yarn run v1.15.2
$ jest --verbose=false --no-cache
 FAIL  components/Button/__tests__/storyshots.test.js
  ● Test suite failed to run

    /home/kushagra/work/clarisghts/KnitUI/components/assets/fonts/Inter-Thin-BETA.woff:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){wOFF
                                                                                                 

    SyntaxError: Invalid or unexpected token

    > 1 | const InterThin = require("../assets/fonts/Inter-Thin-BETA.woff")
        |                   ^
      2 | const InterLight = require("../assets/fonts/Inter-Light-BETA.woff")
      3 | const InterRegular = require("../assets/fonts/Inter-Regular.woff")
      4 | const InterMedium = require("../assets/fonts/Inter-Medium.woff")

      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:471:17)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:513:25)
      at Object.<anonymous> (components/styles/fonts.tsx:1:19)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant