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

Accessing the webcam during testing #433

Open
carpiediem opened this issue Jan 31, 2018 · 1 comment
Open

Accessing the webcam during testing #433

carpiediem opened this issue Jan 31, 2018 · 1 comment

Comments

@carpiediem
Copy link

I'm developing a library that activates a user's webcam and analyzes the captured images. I'd like to test that portion of my code in mocha, but I'm not sure how. I don't imagine it will be possible in the command line (npm test). The browser-based test runner (npm run test-browser) seems plausible, except that it loads with the file:// protocol, instead of localhost. That means the browser prevents the code from accessing the webcam.

Any reccomendations on modifying this boilerplate to run the test runner at http://localhost/test/runner.html (or similar) instead of file:///path/to/project/test/runner.html? Thanks.

@carpiediem
Copy link
Author

I've tried integrating karma, as a replacement, but so far I'm not able to get tests run by karma to inject the <script> element I need.

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