Skip to content

Commit

Permalink
Merge branch 'feature/plugins' into plugin/schisto
Browse files Browse the repository at this point in the history
  • Loading branch information
dcdenu4 committed Nov 25, 2024
2 parents 9555dbe + e6318a6 commit edf63f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"start": "yarn build-main && yarn build:preload && concurrently --kill-others \"yarn serve\" \"electron .\"",
"serve": "cross-env MODE=development node scripts/watch.js",
"lint": "eslint --cache --color --ext .jsx,.js src",
"test": "cross-env PORT=56788 jest --runInBand --testPathIgnorePatterns /tests/binary_tests/ /tests/sampledata_linkcheck/",
"test": "jest --runInBand --testPathIgnorePatterns /tests/binary_tests/ /tests/sampledata_linkcheck/",
"test-main": "jest --runInBand --testMatch **/tests/main/*.test.js",
"test-renderer": "jest --runInBand --testMatch **/tests/renderer/*.test.js",
"test-flask": "cross-env PORT=56788 jest --runInBand --testMatch **/tests/invest/*.test.js",
"test-flask": "jest --runInBand --testMatch **/tests/invest/*.test.js",
"test-electron-app": "jest --runInBand --testMatch **/tests/binary_tests/*.test.js",
"test-sampledata-registry": "jest --runInBand --testMatch **/tests/sampledata_linkcheck/*.test.js",
"postinstall": "electron-builder install-app-deps",
Expand Down
6 changes: 4 additions & 2 deletions workbench/src/main/setupAddRemovePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const logger = getLogger(__filename.split('/').slice(-1)[0]);
* Spawn a child process and log its stdout, stderr, and any error in spawning.
*
* child_process.spawn is called with the provided cmd, args, and options,
* and the windowsHide option set to true.
* and the windowsHide option set to true. The shell option is set to true
* because spawn by default sets shell to false.
*
* Required properties missing from the store are initialized with defaults.
* Invalid properties are reset to defaults.
Expand All @@ -27,7 +28,8 @@ const logger = getLogger(__filename.split('/').slice(-1)[0]);
*/
function spawnWithLogging(cmd, args, options) {
logger.info(cmd, args);
const cmdProcess = spawn(cmd, args, { ...options, shell: true, windowsHide: true });
const cmdProcess = spawn(
cmd, args, { ...options, shell: true, windowsHide: true });
if (cmdProcess.stdout) {
cmdProcess.stderr.on('data', (data) => logger.info(data.toString()));
cmdProcess.stdout.on('data', (data) => logger.info(data.toString()));
Expand Down
1 change: 1 addition & 0 deletions workbench/tests/main/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ describe('createWindow', () => {
});

describe('investUsageLogger', () => {
// Set default PORT for URL, but it's not used by the test.
const PORT = 3000;
const expectedURL = `http://127.0.0.1:${PORT}/api/log_model_start`;
beforeEach(() => {
Expand Down

0 comments on commit edf63f0

Please sign in to comment.