Esempio n. 1
0
    it('should monitor hash changes and call callback', (done) => {
        stopMonitoringUrlChanges();

        monitorUrlChanges(() => {
            done();
        });

        window.location.hash = 'blorp';
    });
Esempio n. 2
0
    it('should monitor replace state changes and call callback', (done) => {
        stopMonitoringUrlChanges();

        monitorUrlChanges(() => {
            done();
        });

        history.replaceState({
            blap: true
        }, 'blap', 'testerino');
    });