ember-window-mock icon indicating copy to clipboard operation
ember-window-mock copied to clipboard

Support `window.history`

Open dbendaou opened this issue 4 years ago • 1 comments

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

dbendaou avatar Mar 20 '20 11:03 dbendaou

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...

simonihmig avatar Mar 30 '20 18:03 simonihmig