Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ› [Bug] error by tests "window is not defined" #1189

Open
ogerly opened this issue Jun 19, 2024 · 1 comment
Open

πŸ› [Bug] error by tests "window is not defined" #1189

ogerly opened this issue Jun 19, 2024 · 1 comment
Labels
bug Something isn't working service:frontend

Comments

@ogerly
Copy link
Contributor

ogerly commented Jun 19, 2024

πŸ› Bug

Bei den Tests gibt es bei mir Errors wie unten beschrieben.

es fehlt die globale window const.

frontend/src/components/buttons/CreateButtonMobile.vue

error:

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
ReferenceError: window is not defined
❯ Timeout.poll node_modules/vuetify/src/components/VImg/VImg.tsx:249:8
❯ listOnTimeout node:internal/timers:573:17
❯ processTimers node:internal/timers:514:7

This error originated in "src/components/buttons/CreateButtonMobile.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
This error was caught after test environment was torn down. Make sure to cancel any running tasks before test finishes:

  • cancel timeouts using clearTimeout and clearInterval
  • wait for promises to resolve using the await keyword
@Elweyn
Copy link
Member

Elweyn commented Jun 20, 2024

@ogerly thanks for the issue. It seems to be a flaky test...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working service:frontend
Projects
Status: πŸ“‹ Backlog
Development

Successfully merging a pull request may close this issue.

2 participants