You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
analytics.ts trackPageview module-level lastPageviewPath is not reset between test files without explicit call #944
trackPageview in src/lib/analytics.ts stores lastPageviewPath at module level. The resetPageviewTracking test helper exists, but it must be explicitly called in every test file's beforeEach. If a test file forgets to call it, the previous test file's last-pageview state persists, causing trackPageview to silently skip the first call in the new test.
Severity
Low
Suggested Fix
Either auto-reset in a global test setup file (setupTests.ts), or use a ref-based pattern that's scoped to the component/hook instance.
Activity