fix: bind fake mojo service for badging (#25294)

* fix: bind fake mojo service for badging

* Add a test
This commit is contained in:
Shelley Vohr 2020-09-08 08:13:56 -07:00 committed by GitHub
parent 5a8046c994
commit f6df79b927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -17,6 +17,14 @@ const features = process._linkedBinding('electron_common_features');
describe('chromium feature', () => {
const fixtures = path.resolve(__dirname, 'fixtures');
describe('Badging API', () => {
it('does not crash', () => {
expect(() => {
navigator.setAppBadge(42);
}).to.not.throw();
});
});
describe('heap snapshot', () => {
it('does not crash', function () {
process._linkedBinding('electron_common_v8_util').takeHeapSnapshot();