ember-window-mock
ember-window-mock copied to clipboard
Support `window.history`
Hi,
Either I've miss something or not, but the README doesn't make any mention of window.history
I was trying to test my back button that basically does window.history.back()
but my test was still returning to the previous page 😅
In the controller that contain the goBack
function I've added
import window from 'ember-window-mock';
and in the test I've added both
import { setupWindowMock } from 'ember-window-mock';
and
setupWindowMock(hooks);
Is this out of scope to support things like that with history
or should I do it another way ?
Thanks for your help
It is basically a missing feature! 🙂
Keeping this here as a feature request. But not sure if I am able to implement this in the foreseeable future. PRs certainly welcome...