reload page after logout if no redirect #17
Annotations
4 errors
|
test
Process completed with exit code 1.
|
|
tests/unit/auth.test.js > Auth Module > logout() > should remove token from axios headers:
src/modules/auth.ts#L80
TypeError: window.location.reload is not a function
❯ Object.logout src/modules/auth.ts:80:27
❯ tests/unit/auth.test.js:195:25
|
|
tests/unit/auth.test.js > Auth Module > login() > should use current URL when nextUrl is not provided:
tests/unit/auth.test.js#L171
AssertionError: expected '/login?from_url=https%3A%2F%2Fexample…' to be 'https://api.base44.com/login?from_url…' // Object.is equality
- Expected
+ Received
- https://api.base44.com/login?from_url=https%3A%2F%2Fexample.com%2Fcurrent-page&app_id=test-app-id
+ /login?from_url=https%3A%2F%2Fexample.com%2Fcurrent-page
❯ tests/unit/auth.test.js:171:33
|
|
tests/unit/auth.test.js > Auth Module > login() > should redirect to login page with correct URL in browser environment:
tests/unit/auth.test.js#L151
AssertionError: expected '/login?from_url=https%3A%2F%2Fexample…' to be 'https://api.base44.com/login?from_url…' // Object.is equality
- Expected
+ Received
- https://api.base44.com/login?from_url=https%3A%2F%2Fexample.com%2Fdashboard&app_id=test-app-id
+ /login?from_url=https%3A%2F%2Fexample.com%2Fdashboard
❯ tests/unit/auth.test.js:151:33
|