Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
santoshdasa12345 committed Dec 17, 2024
1 parent 2ded698 commit 6a4d5ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/unit-client/assets/javascripts/lib/xhr.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@ describe('XHR', () => {
expect(history.location.search).to.equal('?a=1&b=2')
})
it('should not call history.push if params are not provided', () => {
const history = createMemoryHistory();
const res = { data: {} }
const params = {}

console.log('Initial history.location.search:', history.location.search);

XHR.updateOutlet(res, params)
expect(history.location.search).to.equal('')
console.log('Params provided to XHR.updateOutlet:', params);
console.log('History location after updateOutlet:', history.location);
})
it('should perform page load if unable to pushState', () => {
sinon.stub(history, 'replace').throws('error')
Expand Down

0 comments on commit 6a4d5ae

Please sign in to comment.