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

Support running QUnit in a Web Worker #1022

Closed
ghost opened this issue Jul 14, 2016 · 7 comments
Closed

Support running QUnit in a Web Worker #1022

ghost opened this issue Jul 14, 2016 · 7 comments
Labels
Type: Enhancement New idea or feature request.

Comments

@ghost
Copy link

ghost commented Jul 14, 2016

I'm working on hacking a version of QUnit 2.0 to work in a WebWorker/ServiceWorker, but it would be nice to have official support for it.

@jzaefferer
Copy link
Member

What's your usecase?

@ghost
Copy link
Author

ghost commented Jul 14, 2016

@jzaefferer Unit testing code inside a WebWorker/ServiceWorker.

@jzaefferer
Copy link
Member

Yeah, I got that much from your initial ticket. Why do you need to unit test inside a WebWorker/ServiceWorker?

@ghost
Copy link
Author

ghost commented Jul 14, 2016

So I can build a WebWorker/ServiceWorker using TDD.

@trentmwillis
Copy link
Member

What sort of tests would you like to perform that you can't test externally from the Worker? I imagine in most cases the Worker should have functionality initiated from the browser window and return some sort of response, in which case you shouldn't need to run QUnit in the Worker.

@ghost
Copy link
Author

ghost commented Jul 14, 2016

I want to white box test complex worker code. Trying to black box test workers does work, but it's like trying to test your application with only acceptance tests.

@trentmwillis
Copy link
Member

I tend to think most applications should be primarily tested via acceptance tests. Could you modularize the complex code and test it in Node (or something to that effect)?

Note, I'm not opposed to supporting additional environments, just making sure there are compelling reasons to do so. What sort of changes do you think would need to happen in order for QUnit to support this? I imagine some sort of communication channel between Browser/Worker and ensuring QUnit doesn't rely on globals not available in the Worker.

@Krinkle Krinkle changed the title Support running qUnit in a Web Worker Support running QUnit in a Web Worker Jul 18, 2016
@Krinkle Krinkle added the Type: Enhancement New idea or feature request. label Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New idea or feature request.
Development

No branches or pull requests

3 participants