Skip to content

Commit b599c77

Browse files
authored
Merge pull request #19 from spaceagetv/feat/e37
feat: Electron 37 compatibility
2 parents 829bac8 + d86ee9a commit b599c77

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"chai": "^4.3.8",
5454
"chai-as-promised": "^7.1.1",
5555
"conventional-changelog-conventionalcommits": "^8.0.0",
56-
"electron": "^35.1.2",
56+
"electron": "^37.0.0",
5757
"electron-mocks": "file:./",
5858
"eslint": "^9.16.0",
5959
"eslint-config-prettier": "^9.1.0",

src/MockBrowserWindow.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ export class MockBrowserWindow extends EventEmitter implements BrowserWindow {
7373
private _title = ''
7474
private _modal = false
7575
private _skipTaskbar = false
76+
private _contentProtected = false
77+
private _snapped = false
7678

7779
// methods
7880
destroy = sinon.spy(() => {
@@ -353,7 +355,14 @@ export class MockBrowserWindow extends EventEmitter implements BrowserWindow {
353355
})
354356
isVisibleOnAllWorkspaces = sinon.spy(() => this._visibleOnAllWorkspaces)
355357
setIgnoreMouseEvents = sinon.spy()
356-
setContentProtection = sinon.spy()
358+
setContentProtection = sinon.spy((enable: boolean) => {
359+
this._contentProtected = enable
360+
})
361+
isContentProtected = sinon.spy(() => this._contentProtected)
362+
get snapped(): boolean {
363+
return this._snapped
364+
}
365+
isSnapped = sinon.spy(() => this._snapped)
357366
setFocusable = sinon.spy((focusable: boolean) => {
358367
this.focusable = focusable
359368
})

0 commit comments

Comments
 (0)