mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
This hack dates all the way back to 2013:a2c4a78743Though it is convenient to reload the browser when server files change while running test-packages, that's not the behavior of most Meteor apps that use the autoupdate package, and this hack introduced a signficant difference in behavior between the test-in-browser and test-in-console driver packages, which finally surfaced due to the interaction between @toinevk's headless testing PR #9814 and my refactoring of the autoupdate package (fe9e4035f9). Tests should behave the same regardless of which driver package is used. It turns out there's a better way to make the browser reload each time the server restarts: simply modify Meteor.settings.public, since that object is included in the client hashes computed by the webapp package.
7 lines
392 B
JavaScript
7 lines
392 B
JavaScript
// If autoupdate is installed, modifying Meteor.settings.public will cause
|
|
// the hashes in Autoupdate.versions to be computed differently, which
|
|
// will trigger a reload in the browser, which is what we want when
|
|
// running test-packages in the browser, since reloading the window is
|
|
// what kicks off both server and client tests again.
|
|
Meteor.settings.public.autoupdateSalt = Random.id();
|