-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Client tests in watch mode: Runner does not refresh on client changes #35
Comments
@lpgeiger This is expected based on how the watch mode stuff works. There's a note about it in the readme here: https://github.com/meteortesting/meteor-mocha#run-app-tests There may be some way to detect that client was refreshed and send a message to the server telling it to restart. |
@aldeed just curious, what is it that overrides Meteor's default reload mechanism ? |
@hexsprite (late response) It isn't overridden. The page does reload, but our Node driver code that is loading the page in headless browser does not know when this happens, so it doesn't know to restart the test reporting sequence. |
Couldn't we hook into Meteor's hot reload code to know when the Node driver should restart the test reporting sequence? |
@mitar I'm quite new to the meteor internals going this far - but anyone else interested is very welcome to try and find out and share insights. As a crutch (at least in german we would refer to it as this) you could just add a new-line on a file imported in the server-side code which would make the server reload. Calling it crutch because it helps you getting your way down the road, but it feels too bad for calling it a work-around. |
Here is a quick and dirty workaround that will watch your client directory (you probably need to adjust the file extensions list) and then add whitespace on a test file in the server directory. It's not perfect but it works very nicely =)
|
Digging a bit into this issue, I found two events used by Meteor internally: Here is a sample of usage: Maybe we're able to run the tests on the client again based on that ... Let's give it a try 😎 |
I have now pushed a version which contains a working prototype of this. Please leave a comment on what you think about it:
|
Created a PR for this - all further details should be shared there: #106 |
Does anyone else have an issue with client tests not re-running in watch mode?
I'm wondering if anyone can reproduce on their own stack.
Steps to reproduce:
Expected: full test suite to re-run.
Actual: No change, just the standard print: '=> Client modified -- refreshing'
Any ideas?
The text was updated successfully, but these errors were encountered: