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

is there any example of how to test a presentation? #270

Closed
sibelius opened this issue Jan 18, 2017 · 6 comments
Closed

is there any example of how to test a presentation? #270

sibelius opened this issue Jan 18, 2017 · 6 comments

Comments

@sibelius
Copy link

I'm writing a presentation about testing using Jest, and I would like to test the presentation slides using spectacle.

I have some trouble with this:

Cannot find module 'raw!../assets/code/sum.js' from 'index.js'
      
      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:151:17)
      at Presentation.render (presentation/index.js:165:29)

I've tried to have a custom moduleNameMapper, but it did not solved my problem:

"moduleNameMapper": {
      "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/fileTransformer.js",
      "\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
      "\\raw!": "<rootDir>/__mocks__/fileMock.js"
    }
@kenwheeler
Copy link
Contributor

Still having this issue? Do you have raw-loader installed?

@sibelius
Copy link
Author

@kenwheeler
Copy link
Contributor

whats the failure

@sibelius
Copy link
Author

the failure is described above: #270 (comment)

you can test using yarn test

my guess is that this is a problem with jest and raw-loader

@sibelius
Copy link
Author

@rawrmonstar
Copy link
Contributor

This doesn't seem to be an issue with Spectacle itself.

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

No branches or pull requests

3 participants