Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
CapitaineJSparrow committed Oct 4, 2022
1 parent 23d6474 commit 954b4ad
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ window.on('show', () => {
)
})

describe('Trigger "on-focus-out-event" should work', async () => new Promise((resolve) => {
const entry = new Gtk.SearchEntry();
const event = new Gdk.EventFocus()
event.type = Gdk.EventType.FOCUS_CHANGE
event.window = entry.getWindow()
event.sendEvent = 1

entry.on('focus-out-event', (event) => {
resolve();
})

const result = entry.emit('focus-out-event', event)
}));

describe('types are as correct as possible', () => {
const event = new Gdk.EventButton()
event.type = Gdk.EventType.BUTTON_PRESS
Expand Down

0 comments on commit 954b4ad

Please sign in to comment.