diff --git a/CHANGELOG.md b/CHANGELOG.md index 4575a85de209..7af1fa88d4be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ - `[jest-jasmine2, jest-types]` [**BREAKING**] Move all `jasmine` specific types from `@jest/types` to its own package ([#12125](https://github.com/facebook/jest/pull/12125)) - `[jest-matcher-utils]` Pass maxWidth to `pretty-format` to avoid printing every element in arrays by default ([#12402](https://github.com/facebook/jest/pull/12402)) - `[jest-mock]` Fix function overloads for `spyOn` to allow more correct type inference in complex object ([#12442](https://github.com/facebook/jest/pull/12442)) +- `[jest-reporters]` Notifications generated by the `--notify` flag are no longer persistent in GNOME Shell. ([#11733](https://github.com/facebook/jest/pull/11733)) ### Chore & Maintenance diff --git a/packages/jest-reporters/src/NotifyReporter.ts b/packages/jest-reporters/src/NotifyReporter.ts index ec8a201e246f..f59834586b72 100644 --- a/packages/jest-reporters/src/NotifyReporter.ts +++ b/packages/jest-reporters/src/NotifyReporter.ts @@ -81,7 +81,13 @@ export default class NotifyReporter extends BaseReporter { result.numPassedTests, )} passed`; - this._notifier.notify({icon, message, timeout: false, title}); + this._notifier.notify({ + hint: 'int:transient:1', + icon, + message, + timeout: false, + title, + }); } else if ( testsHaveRun && !success && @@ -109,12 +115,20 @@ export default class NotifyReporter extends BaseReporter { const quitAnswer = 'Exit tests'; if (!watchMode) { - this._notifier.notify({icon, message, timeout: false, title}); + this._notifier.notify({ + hint: 'int:transient:1', + icon, + message, + timeout: false, + title, + }); } else { this._notifier.notify( { + // @ts-expect-error - not all options are supported by all systems (specifically `actions` and `hint`) actions: [restartAnswer, quitAnswer], closeLabel: 'Close', + hint: 'int:transient:1', icon, message, timeout: false,