Test: Add Linux GTK version switch for electron to fix test-node
This commit is contained in:
parent
fb0c414702
commit
e69c036c4b
2 changed files with 12 additions and 1 deletions
|
@ -46,7 +46,7 @@
|
|||
"test": "run-s test-node test-electron test-lint-intl test-eslint",
|
||||
"test-electron": "node ts/scripts/test-electron.js",
|
||||
"test-release": "node ts/scripts/test-release.js",
|
||||
"test-node": "cross-env LANG=en-us electron-mocha --timeout 10000 --file test/setup-test-node.js --recursive ts/test-node ts/test-both",
|
||||
"test-node": "cross-env LANG=en-us electron-mocha --timeout 10000 --main test/fix-linux-gtk.js --file test/setup-test-node.js --recursive ts/test-node ts/test-both",
|
||||
"test-mock": "mocha --require ts/test-mock/setup-ci.js ts/test-mock/**/*_test.js",
|
||||
"test-eslint": "mocha .eslint/rules/**/*.test.js --ignore-leaks",
|
||||
"test-lint-intl": "ts-node ./build/intl-linter/linter.ts --test",
|
||||
|
|
11
test/fix-linux-gtk.js
Normal file
11
test/fix-linux-gtk.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
// Copyright 2025 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const { app } = require('electron');
|
||||
|
||||
if (process.platform === 'linux') {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Applying electron switch for Linux GTK version --gtk-version=3');
|
||||
// https://github.com/electron/electron/issues/46538#issuecomment-2808806722
|
||||
app.commandLine.appendSwitch('gtk-version', '3');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue