capricorn86 / happy-dom

A JavaScript implementation of a web browser without its graphical user interface
MIT License
3.28k stars 201 forks source link

History api - wouter #937

Open gkiely opened 1 year ago

gkiely commented 1 year ago

Describe the bug Wouter is a lightweight alternative to react-router that uses the history api. It appears to be failing when attempting to navigate using happy-dom

To Reproduce

  1. Go to https://codesandbox.io/p/sandbox/fragrant-moon-hjtkzh

Expected behavior

Additional context https://github.com/molefrog/wouter/issues/315

fjswhl commented 11 months ago

https://github.com/capricorn86/happy-dom/blob/729953c9777e06c8ab5425a9f1d052dca8b16228/packages/happy-dom/src/history/History.ts#L9

looks like happy-dom currently does not support the History api, history mock is empty implementation now. so if you test your router, it will not work