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

Part of #1117: Update electron to v34 #1123

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tupaschoal
Copy link
Collaborator

@tupaschoal tupaschoal commented Jan 12, 2025

Collaborative draft to work on the tests failures. With this upgrade, 3 tests fail with the following log:

1:

  1) main-window.mjs
       createWindow()
         Should create and get window default behaviour:

      AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

2 !== 1

      + expected - actual

      -2
      +1

      at Context.<anonymous> (file:///C:/GitHub/time-to-leave/__tests__/__main__/main-window.mjs:84:20)
      at process.processImmediate (node:internal/timers:483:21)

2:

  2) Windows tests
       Should reset waiverWindow on close:
     Uncaught TypeError: Cannot read properties of undefined (reading 'defaultPrevented')
      at node:electron/js2c/browser_init:2:13112
      at node:internal/process/task_queues:140:7
      at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
      at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
      at s.send (node:electron/js2c/browser_init:2:92689)
      at _.send (node:electron/js2c/browser_init:2:76113)
      at BrowserWindow.<anonymous> (file:///C:/GitHub/time-to-leave/js/windows.mjs:50:32)
      at BrowserWindow.emit (node:events:530:35)
      at Context.<anonymous> (file:///C:/GitHub/time-to-leave/__tests__/__main__/windows.mjs:86:27)
      at process.processImmediate (node:internal/timers:483:21)

3:

  3) Windows tests
       Should reset waiverWindow on close:
     Error: done() called multiple times in test <Windows tests Should reset waiverWindow on close> of file C:\GitHub\time-to-leave\__tests__\__main__\windows.mjs
      at process.processImmediate (node:internal/timers:483:21)

@tupaschoal
Copy link
Collaborator Author

a7a4acb fixes the issue 3, and reduces the size of 2 (??) Seems like we need to mock/stop the defaultPrevent from running. Here's how 2 looks after it:

  1) Windows tests
       Should reset waiverWindow on close:
     Uncaught TypeError: Cannot read properties of undefined (reading 'defaultPrevented')
      at node:electron/js2c/browser_init:2:13112
      at node:internal/process/task_queues:140:7
      at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
      at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@tupaschoal tupaschoal changed the title Part of #1117: Update eslint from 9.17.0 to 9.18.0 Part of #1117: Update electron to v33 Jan 13, 2025
@tupaschoal tupaschoal changed the title Part of #1117: Update electron to v33 Part of #1117: Update electron to v34 Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant