feat: allow macOS tray to maintain position (#47838)

* feat: allow macOS tray to maintain position

* refactor: just use guid

* test: fixup tests

* docs: clarify UUID format
This commit is contained in:
Shelley Vohr 2025-08-07 19:25:50 +02:00 committed by GitHub
commit a0d983e4b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 101 additions and 34 deletions

View file

@ -30,13 +30,13 @@ describe('tray module', () => {
}).to.throw(/Failed to load image from path (.+)/);
});
ifit(process.platform === 'win32')('throws a descriptive error if an invalid guid is given', () => {
ifit(process.platform !== 'linux')('throws a descriptive error if an invalid guid is given', () => {
expect(() => {
tray = new Tray(nativeImage.createEmpty(), 'I am not a guid');
}).to.throw('Invalid GUID format');
});
ifit(process.platform === 'win32')('accepts a valid guid', () => {
ifit(process.platform !== 'linux')('accepts a valid guid', () => {
expect(() => {
tray = new Tray(nativeImage.createEmpty(), '0019A433-3526-48BA-A66C-676742C0FEFB');
}).to.not.throw();